सुलभता पैटर्न · ओवरले
टॉगलटिप
टॉगलटिप एक बटन है जो दबाने पर एक नोट दिखाता है; इसके उलट, टूलटिप होवर पर दिखता है और उसका अपना कोई बटन नहीं होता। बटन दबाने के एक पल बाद नोट एक लाइव रीजन में लिखा जाता है, इसलिए स्क्रीन रीडर उसे बोल देते हैं और किसी को उसे ढूँढ़ने नहीं जाना पड़ता।
- डब्ल्यूसीएजी मानदंड
- 6
- कीबोर्ड नियम
- 3
- जाँच का तरीक़ा
- axe, कीबोर्ड और इंस्पेक्टर
लाइव डेमो
आज़माएँ
इसे माउस, कीबोर्ड या स्क्रीन रीडर से इस्तेमाल करें। साथ का इंस्पेक्टर दिखाता है कि आपके इस्तेमाल के दौरान ब्राउज़र सहायक तकनीक को क्या बताता है: फ़ोकस, स्थिति में बदलाव और घोषणाएँ।
ऑर्डर सारांश
- सामान (3)
- ₹2,450
- डिलीवरी ₹2,999 से ज़्यादा के ऑर्डर पर डिलीवरी मुफ़्त है। यह ऑर्डर ₹549 कम है, इसलिए ₹49 का तय शुल्क लगता है।
- ₹49
- त्योहार छूट कोड DIWALI200 से ₹1,500 से ज़्यादा के ऑर्डर पर ₹200 की छूट मिलती है। यह 3 नवंबर को ख़त्म होगा।
- −₹200
- कुल
- ₹2,299
क़ीमतों में जीएसटी शामिल है।
जावास्क्रिप्ट के बिना डेमो उतना ही काम करता है जितना उसका एचटीएमएल; इंस्पेक्टर के लिए जावास्क्रिप्ट चाहिए।
कीबोर्ड
जिन कुंजियों पर यह काम करता है
हर क्रिया पॉइंटर के बिना काम करती है।
| कुंजी | यह क्या करती है |
|---|---|
| EnterयाSpace | जानकारी बटन पर, उसका नोट दिखाता है; दोबारा दबाने पर छिपा देता है। एक नोट खोलने से बाकी कोई भी खुला नोट बंद हो जाता है। |
| Escape | खुला नोट छिपा देता है; फ़ोकस बटन पर ही रहता है। |
| TabयाShiftTab | अगले कंट्रोल पर ले जाता है और नोट छिपा देता है। |
स्क्रीन रीडर
यह क्या घोषित करता है
मार्कअप की भूमिकाओं, नामों और स्थितियों से लिखा गया।
| कब | अपेक्षित घोषणा |
|---|---|
| फ़ोकस जानकारी बटन पर पहुँचता है | डिलीवरी शुल्क के बारे में और, बटन, बंद |
| Enter नोट दिखाता है | खुला। ₹2,999 से ज़्यादा के ऑर्डर पर डिलीवरी मुफ़्त है। यह ऑर्डर ₹549 कम है, इसलिए ₹49 का तय शुल्क लगता है। |
| Escape इसे छिपा देता है | बंद |
ये अपेक्षित घोषणाएँ हैं, रिकॉर्डिंग नहीं। स्क्रीन रीडर और ब्राउज़र के हिसाब से शब्द और क्रम बदलते हैं।
कोड
कोड कॉपी करें
वही फ़ाइलें जिन पर यह डेमो चलता है। स्टाइल एक प्रीफ़िक्स के साथ परोसी जाती हैं जो इस साइट की अपनी स्टाइल को डेमो से दूर रखता है; आप जो कॉपी करते हैं वह मूल है।
<div class="ap-toggletip" data-ap-toggletip>
<h3 class="ap-toggletip__name">Order summary</h3>
<dl class="ap-toggletip__rows">
<div class="ap-toggletip__row">
<dt>Items <span class="ap-toggletip__qty">(3)</span></dt>
<dd>₹2,450</dd>
</div>
<div class="ap-toggletip__row">
<dt>
Delivery
<span class="ap-toggletip__wrap">
<button type="button" class="ap-toggletip__btn" id="toggletip-delivery-btn" aria-label="More about delivery charges" aria-expanded="false">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="M12 11v5"/><path d="M12 7.5h.01"/></svg>
</button>
<span class="ap-toggletip__live" role="status">
<span class="ap-toggletip__bubble" data-ap-note hidden>Delivery is free on orders over ₹2,999. This one is ₹549 short, so a flat ₹49 applies.</span>
</span>
</span>
</dt>
<dd>₹49</dd>
</div>
<div class="ap-toggletip__row">
<dt>
Festive discount
<span class="ap-toggletip__wrap">
<button type="button" class="ap-toggletip__btn" id="toggletip-discount-btn" aria-label="More about the festive discount" aria-expanded="false">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="M12 11v5"/><path d="M12 7.5h.01"/></svg>
</button>
<span class="ap-toggletip__live" role="status">
<span class="ap-toggletip__bubble" data-ap-note hidden>Code DIWALI200 takes ₹200 off orders over ₹1,500. It ends on 3 November.</span>
</span>
</span>
</dt>
<dd class="ap-toggletip__minus">−₹200</dd>
</div>
<div class="ap-toggletip__row ap-toggletip__row--total">
<dt>Total</dt>
<dd>₹2,299</dd>
</div>
</dl>
<p class="ap-toggletip__note">Prices include GST.</p>
</div>
/* Toggletip. Uses the --ap-* design tokens. */
.ap-toggletip {
width: min(100%, 400px);
margin-inline: auto;
padding: 22px 24px 20px;
border: 1px solid var(--ap-border);
border-radius: var(--ap-radius-lg);
background: var(--ap-surface);
box-shadow: var(--ap-shadow-md);
container-type: inline-size;
}
.ap-toggletip__name {
margin: 0 0 10px;
font-size: 1.0625rem;
font-weight: 650;
line-height: 1.35;
}
.ap-toggletip__rows {
display: grid;
margin: 0;
}
.ap-toggletip__row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
min-height: 48px;
border-top: 1px solid var(--ap-border);
}
.ap-toggletip__row:first-child {
border-top: 0;
}
.ap-toggletip__row dt {
display: flex;
align-items: center;
gap: 2px;
color: var(--ap-text-2);
}
.ap-toggletip__row dd {
margin: 0;
color: var(--ap-text);
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.ap-toggletip__qty {
margin-inline-start: 4px;
color: var(--ap-text-3);
}
.ap-toggletip__row dd.ap-toggletip__minus {
color: var(--ap-success);
}
.ap-toggletip__row--total {
margin-top: 6px;
padding-top: 8px;
border-top-color: var(--ap-border-strong);
font-size: 1.0625rem;
}
.ap-toggletip__row--total dt {
color: var(--ap-text);
font-weight: 650;
}
.ap-toggletip__row--total dd {
font-weight: 700;
}
.ap-toggletip__note {
margin: 6px 0 0;
color: var(--ap-text-3);
font-size: .8125rem;
}
/* The button and its note */
.ap-toggletip__wrap {
position: relative;
display: inline-flex;
}
.ap-toggletip__btn {
display: grid;
place-items: center;
width: 32px;
height: 32px;
padding: 0;
border: 0;
border-radius: var(--ap-radius-full);
background: transparent;
color: var(--ap-text-3);
cursor: pointer;
transition: background-color var(--ap-duration) var(--ap-ease), color var(--ap-duration) var(--ap-ease);
}
.ap-toggletip__btn:hover {
background: var(--ap-surface-2);
color: var(--ap-text);
}
.ap-toggletip__btn[aria-expanded="true"] {
background: var(--ap-accent-soft);
color: var(--ap-accent-soft-text);
}
.ap-toggletip__btn:focus-visible {
outline: 2px solid var(--ap-focus);
outline-offset: 1px;
}
.ap-toggletip__btn svg {
width: 18px;
height: 18px;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
/* Placed by the script: above the button, or below when there is no room,
and kept inside the card. */
.ap-toggletip__bubble {
position: absolute;
z-index: 2;
bottom: calc(100% + 10px);
left: 0;
width: max-content;
max-width: min(260px, calc(100cqi - 24px));
padding: 10px 14px;
border-radius: var(--ap-radius);
background: var(--ap-text);
color: var(--ap-surface);
font-size: .875rem;
font-weight: 500;
line-height: 1.5;
text-align: start;
box-shadow: var(--ap-shadow-lg);
animation: ap-toggletip-in var(--ap-duration) var(--ap-ease);
}
.ap-toggletip__bubble[data-side="bottom"] {
top: calc(100% + 10px);
bottom: auto;
--ap-toggletip-from: -4px;
}
.ap-toggletip__bubble::before {
content: "";
position: absolute;
bottom: -4px;
left: var(--arrow-x, 16px);
width: 10px;
height: 10px;
border-radius: 2px;
background: inherit;
transform: translateX(-50%) rotate(45deg);
}
.ap-toggletip__bubble[data-side="bottom"]::before {
top: -4px;
bottom: auto;
}
@keyframes ap-toggletip-in {
from { opacity: 0; transform: translateY(var(--ap-toggletip-from, 4px)); }
}
@media (forced-colors: active) {
.ap-toggletip__bubble { border: 1px solid CanvasText; }
.ap-toggletip__bubble::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
.ap-toggletip__btn { transition: none; }
.ap-toggletip__bubble { animation: none; }
}
/**
* Toggletip: an info button that shows a short note when pressed, written
* into a live region so screen readers announce it.
*
* Markup: [data-ap-toggletip] holding, for each note, a .ap-toggletip__wrap
* with a button[aria-expanded] and a role=status region that contains the
* note ([data-ap-note]), hidden until the button is pressed.
*/
const ANNOUNCE_DELAY = 100; // empty first, then the note: the addition is what gets announced
const GAP = 10; // between the button and the note
const EDGE = 12; // the closest the note comes to the card's edge
export function init(root) {
const ac = new AbortController();
const on = (target, type, fn) => target.addEventListener(type, fn, { signal: ac.signal });
const tips = [...root.querySelectorAll(".ap-toggletip__wrap")].map((wrap) => ({
wrap,
button: wrap.querySelector("button[aria-expanded]"),
live: wrap.querySelector("[role=status]"),
note: wrap.querySelector("[data-ap-note]"),
timer: 0,
}));
const isOpen = (t) => t.button.getAttribute("aria-expanded") === "true";
function place(t) {
const { button, note, wrap } = t;
const b = button.getBoundingClientRect();
const card = root.getBoundingClientRect();
const w = note.offsetWidth;
const h = note.offsetHeight;
const centre = b.left + b.width / 2;
const left = Math.min(Math.max(centre - w / 2, card.left + EDGE), card.right - EDGE - w);
const fitsAbove = b.top - GAP - h >= 8;
const fitsBelow = b.bottom + GAP + h <= document.documentElement.clientHeight - 8;
note.dataset.side = fitsAbove || !fitsBelow ? "top" : "bottom";
note.style.left = `${Math.round(left - wrap.getBoundingClientRect().left)}px`;
note.style.setProperty("--arrow-x", `${Math.round(centre - left)}px`);
}
function open(t) {
for (const other of tips) if (other !== t) close(other);
t.button.setAttribute("aria-expanded", "true");
// Empty the live region, then put the note back a moment later.
t.note.hidden = true;
t.live.replaceChildren();
clearTimeout(t.timer);
t.timer = setTimeout(() => {
t.note.hidden = false;
t.live.append(t.note);
place(t);
}, ANNOUNCE_DELAY);
}
function close(t) {
clearTimeout(t.timer);
if (!isOpen(t)) return;
t.button.setAttribute("aria-expanded", "false");
t.note.hidden = true;
if (!t.note.isConnected) t.live.append(t.note);
}
on(root, "click", (event) => {
const t = tips.find((x) => x.button === event.target.closest("button"));
if (t) (isOpen(t) ? close : open)(t);
});
// Tab, or anything else that moves focus to another control, closes the
// note. A click inside the note can hand focus to a focusable ancestor
// (often main); that is not leaving, so it is ignored.
for (const t of tips) {
on(t.wrap, "focusout", (event) => {
const to = event.relatedTarget;
if (to && !t.wrap.contains(to) && !to.contains(t.wrap)) close(t);
});
}
on(document, "click", (event) => {
for (const t of tips) if (isOpen(t) && !t.wrap.contains(event.target)) close(t);
});
on(document, "keydown", (event) => {
if (event.key !== "Escape") return;
const t = tips.find(isOpen);
if (!t) return;
close(t);
event.preventDefault();
});
on(window, "resize", () => { for (const t of tips) if (isOpen(t) && !t.note.hidden) place(t); });
return () => {
ac.abort();
for (const t of tips) close(t);
};
}
for (const root of document.querySelectorAll("[data-ap-toggletip]")) init(root);
/* Design tokens for the pattern components. Light by default, dark when the
system asks for it; set data-theme="dark" on :root to force dark. */
:root {
--ap-radius-sm: 8px;
--ap-radius: 12px;
--ap-radius-lg: 16px;
--ap-radius-full: 999px;
--ap-font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--ap-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
--ap-ease: cubic-bezier(.2, .8, .2, 1);
--ap-duration: 180ms;
--ap-target: 44px;
--ap-bg: #F4F4F5;
--ap-surface: #FFFFFF;
--ap-surface-2: #F4F4F5;
--ap-surface-3: #E4E4E7;
--ap-border: #E4E4E7;
--ap-border-strong: #76767F;
--ap-text: #18181B;
--ap-text-2: #3F3F46;
--ap-text-3: #5E5E66;
--ap-accent: #4F46E5;
--ap-accent-hover: #4338CA;
--ap-on-accent: #FFFFFF;
--ap-accent-text: #4338CA;
--ap-accent-soft: #EEF2FF;
--ap-accent-soft-text: #3730A3;
--ap-focus: #4F46E5;
--ap-danger: #B91C1C;
--ap-danger-soft: #FEF2F2;
--ap-success: #15803D;
--ap-success-soft: #F0FDF4;
--ap-warning: #A15C07;
--ap-warning-soft: #FEFCE8;
--ap-info: #1D4ED8;
--ap-info-soft: #EFF6FF;
--ap-scrim: rgb(9 9 11 / .48);
--ap-shadow-sm: 0 1px 2px rgb(9 9 11 / .06);
--ap-shadow-md: 0 1px 2px rgb(9 9 11 / .05), 0 6px 16px -4px rgb(9 9 11 / .1);
--ap-shadow-lg: 0 2px 6px rgb(9 9 11 / .06), 0 20px 40px -12px rgb(9 9 11 / .22);
--ap-light-bg: #F4F4F5;
--ap-light-surface: #FFFFFF;
--ap-light-surface-2: #F4F4F5;
--ap-light-surface-3: #E4E4E7;
--ap-light-border: #E4E4E7;
--ap-light-border-strong: #76767F;
--ap-light-text: #18181B;
--ap-light-text-2: #3F3F46;
--ap-light-text-3: #5E5E66;
--ap-light-accent: #4F46E5;
--ap-light-accent-hover: #4338CA;
--ap-light-on-accent: #FFFFFF;
--ap-light-accent-text: #4338CA;
--ap-light-accent-soft: #EEF2FF;
--ap-light-accent-soft-text: #3730A3;
--ap-light-focus: #4F46E5;
--ap-light-danger: #B91C1C;
--ap-light-danger-soft: #FEF2F2;
--ap-light-success: #15803D;
--ap-light-success-soft: #F0FDF4;
--ap-light-warning: #A15C07;
--ap-light-warning-soft: #FEFCE8;
--ap-light-info: #1D4ED8;
--ap-light-info-soft: #EFF6FF;
--ap-light-scrim: rgb(9 9 11 / .48);
--ap-light-shadow-sm: 0 1px 2px rgb(9 9 11 / .06);
--ap-light-shadow-md: 0 1px 2px rgb(9 9 11 / .05), 0 6px 16px -4px rgb(9 9 11 / .1);
--ap-light-shadow-lg: 0 2px 6px rgb(9 9 11 / .06), 0 20px 40px -12px rgb(9 9 11 / .22);
--ap-dark-bg: #09090B;
--ap-dark-surface: #18181B;
--ap-dark-surface-2: #27272A;
--ap-dark-surface-3: #3F3F46;
--ap-dark-border: #2E2E33;
--ap-dark-border-strong: #8E8E97;
--ap-dark-text: #FAFAFA;
--ap-dark-text-2: #D4D4D8;
--ap-dark-text-3: #A1A1AA;
--ap-dark-accent: #818CF8;
--ap-dark-accent-hover: #A5B4FC;
--ap-dark-on-accent: #0C0A1F;
--ap-dark-accent-text: #A5B4FC;
--ap-dark-accent-soft: #1E1B4B;
--ap-dark-accent-soft-text: #C7D2FE;
--ap-dark-focus: #A5B4FC;
--ap-dark-danger: #F87171;
--ap-dark-danger-soft: #2A1215;
--ap-dark-success: #4ADE80;
--ap-dark-success-soft: #0F2A1A;
--ap-dark-warning: #FACC15;
--ap-dark-warning-soft: #2A2410;
--ap-dark-info: #60A5FA;
--ap-dark-info-soft: #0F1D33;
--ap-dark-scrim: rgb(0 0 0 / .62);
--ap-dark-shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
--ap-dark-shadow-md: 0 1px 2px rgb(0 0 0 / .4), 0 8px 20px -6px rgb(0 0 0 / .5);
--ap-dark-shadow-lg: 0 2px 8px rgb(0 0 0 / .45), 0 24px 48px -12px rgb(0 0 0 / .7);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--ap-bg: #09090B;
--ap-surface: #18181B;
--ap-surface-2: #27272A;
--ap-surface-3: #3F3F46;
--ap-border: #2E2E33;
--ap-border-strong: #8E8E97;
--ap-text: #FAFAFA;
--ap-text-2: #D4D4D8;
--ap-text-3: #A1A1AA;
--ap-accent: #818CF8;
--ap-accent-hover: #A5B4FC;
--ap-on-accent: #0C0A1F;
--ap-accent-text: #A5B4FC;
--ap-accent-soft: #1E1B4B;
--ap-accent-soft-text: #C7D2FE;
--ap-focus: #A5B4FC;
--ap-danger: #F87171;
--ap-danger-soft: #2A1215;
--ap-success: #4ADE80;
--ap-success-soft: #0F2A1A;
--ap-warning: #FACC15;
--ap-warning-soft: #2A2410;
--ap-info: #60A5FA;
--ap-info-soft: #0F1D33;
--ap-scrim: rgb(0 0 0 / .62);
--ap-shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
--ap-shadow-md: 0 1px 2px rgb(0 0 0 / .4), 0 8px 20px -6px rgb(0 0 0 / .5);
--ap-shadow-lg: 0 2px 8px rgb(0 0 0 / .45), 0 24px 48px -12px rgb(0 0 0 / .7);
}
}
:root[data-theme="dark"] {
--ap-bg: #09090B;
--ap-surface: #18181B;
--ap-surface-2: #27272A;
--ap-surface-3: #3F3F46;
--ap-border: #2E2E33;
--ap-border-strong: #8E8E97;
--ap-text: #FAFAFA;
--ap-text-2: #D4D4D8;
--ap-text-3: #A1A1AA;
--ap-accent: #818CF8;
--ap-accent-hover: #A5B4FC;
--ap-on-accent: #0C0A1F;
--ap-accent-text: #A5B4FC;
--ap-accent-soft: #1E1B4B;
--ap-accent-soft-text: #C7D2FE;
--ap-focus: #A5B4FC;
--ap-danger: #F87171;
--ap-danger-soft: #2A1215;
--ap-success: #4ADE80;
--ap-success-soft: #0F2A1A;
--ap-warning: #FACC15;
--ap-warning-soft: #2A2410;
--ap-info: #60A5FA;
--ap-info-soft: #0F1D33;
--ap-scrim: rgb(0 0 0 / .62);
--ap-shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
--ap-shadow-md: 0 1px 2px rgb(0 0 0 / .4), 0 8px 20px -6px rgb(0 0 0 / .5);
--ap-shadow-lg: 0 2px 8px rgb(0 0 0 / .45), 0 24px 48px -12px rgb(0 0 0 / .7);
}
डब्ल्यूसीएजी 2.2
यह किन मानदंडों को पूरा करता है
वे सफलता मानदंड जिनका यह पैटर्न ध्यान रखता है, और कैसे।
-
1.1.1 गैर-टेक्स्ट सामग्री
स्तर A
हर जानकारी आइकन एक बटन है जिसका नाम वह बताता है जो वह समझाता है, जैसे डिलीवरी शुल्क के बारे में और, सिर्फ़ जानकारी नहीं।
-
2.1.1 कीबोर्ड
स्तर A
नोट Enter या Space से खुलता है और Escape, उसी बटन या Tab से बंद होता है; पॉइंटर की ज़रूरत नहीं पड़ती।
-
2.5.8 टारगेट साइज़ (न्यूनतम)
स्तर AA
क्लिक की जगह पूरा 32 पिक्सेल का बटन है, सिर्फ़ उसमें बना 18 पिक्सेल का आइकन नहीं, इसलिए यह 24 पिक्सेल की न्यूनतम सीमा पार करता है।
-
4.1.2 नाम, भूमिका, मान
स्तर A
बटन पर aria-expanded है, इसलिए उसका नाम, रोल और नोट दिख रहा है या नहीं, यह सब सामने आता है।
-
4.1.3 स्टेटस मैसेज
स्तर AA
नोट role=status वाले क्षेत्र में लिखा जाता है, इसलिए दिखते ही बोला जाता है और फ़ोकस नहीं हिलता।
-
1.4.11 गैर-टेक्स्ट कंट्रास्ट
स्तर AA
जानकारी आइकन और बटन की फ़ोकस रिंग, दोनों थीम में कार्ड के मुक़ाबले 3:1 पार करते हैं।
उपयोग
इसे कब इस्तेमाल करें
इसे अपनाएँ
- किसी रक़म या फ़ील्ड के पास एक-दो वाक्य की मदद: कोई शुल्क क्यों लगता है, किसी शब्द का मतलब क्या है।
- टच स्क्रीन, जहाँ टूलटिप खोला ही नहीं जा सकता।
कुछ और इस्तेमाल करें
- आइकन बटन का लेबल: बटन को नाम दें, या टूलटिप।
- लिंक, फ़ील्ड या किसी काम वाली चीज़ के साथ मदद: पॉपओवर या डिस्क्लोज़र इस्तेमाल करें।
- वह जानकारी जो सबको चाहिए: उसे पेज पर लिखें।
आम विफलताएँ
आमतौर पर यह कहाँ गलत होता है
जानकारी आइकन पर टूलटिप
सिर्फ़ होवर से खुलने वाली मदद फ़ोन पर या कई कीबोर्ड उपयोगकर्ताओं से नहीं खुलती। नोट को खोलने-बंद करने वाला बटन सबके लिए काम करता है।
ऐसा नोट जो कोई नहीं सुनता
बटन के पास छिपा एलिमेंट दिखा देने से स्क्रीन रीडर उपयोगकर्ता को कुछ पता नहीं चलता, उसे इसे ढूँढ़ना पड़ता है। लाइव रीजन इसे बोल देता है।
हर आइकन का नाम जानकारी
बटनों की सूची में जानकारी नाम वाले पाँच बटन एक जैसे लगते हैं। हर एक का नाम उस चीज़ पर रखें जिसे वह समझाता है।
नोट के अंदर लिंक
लाइव रीजन अपनी सामग्री को सादे टेक्स्ट की तरह पढ़ता है, और उसमें रखा लिंक मुश्किल से पहुँच में आता है। काम वाले नोट पॉपओवर में होने चाहिए।
कीबोर्ड से बंद करने का कोई तरीक़ा नहीं
जो नोट सिर्फ़ बाहर क्लिक करने से हटता है, वह हमेशा के लिए सामग्री के ऊपर बैठा रह सकता है। यहाँ Escape, वही बटन और Tab, तीनों इसे बंद करते हैं।
नोट्स
इसे बनाना
- लाइव रीजन शुरू से पेज में मौजूद है। स्क्रिप्ट उसे खाली करती है और एक पल बाद नोट लिखती है, जिसे स्क्रीन रीडर भरोसे से बोलते हैं; अपने टेक्स्ट के साथ एक साथ जोड़ा गया क्षेत्र अक्सर नहीं बोला जाता।
- role=status विनम्र है, इसलिए नोट तब तक रुकता है जब तक स्क्रीन रीडर बटन की स्थिति बोलकर पूरी नहीं कर लेता।
- डीओएम में नोट अपने बटन के ठीक बाद है, इसलिए पेज को आगे पढ़ने वाला कोई भी इसे सही जगह पर पाता है।
- नोट को एक-दो वाक्य के सादे टेक्स्ट तक रखें। स्क्रिप्ट इसे बटन के ऊपर रखती है, जगह न हो तो नीचे, और इसे कार्ड के अंदर ही रखती है।
स्रोत: इन्क्लूसिव कंपोनेंट्स: टूलटिप और टॉगलटिप · WAI-एआरआईए 1.2: status रोल
लाइट और डार्क थीम में, डेस्कटॉप और फ़ोन की चौड़ाई पर axe से और कीबोर्ड से जाँचा गया। अभी हर स्क्रीन रीडर और ब्राउज़र जोड़ी के साथ नहीं परखा गया। सुधार बताएँ