Skip to content

Rule 2ee8b8 ("Visible label is part of accessible name"): introducing a new "label in name algorithm". #2075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 49 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
aeafb90
invalid-form-field-value-36b590: updating failed example 2.
dan-tripp-siteimprove Apr 4, 2023
5a07973
Merge branch 'develop' into develop
Jym77 Apr 27, 2023
a75c7f8
Merge branch 'act-rules:develop' into develop
dan-tripp-siteimprove May 24, 2023
623d26e
Rule visible-label-in-accessible-name-2ee8b8: introducing a new "labe…
dan-tripp-siteimprove Jun 22, 2023
f920a47
Merge branch 'act-rules:develop' into develop
dan-tripp-siteimprove Jun 22, 2023
ee3e993
Merge remote-tracking branch 'origin/develop' into rule-2ee8b8-may-2023
dan-tripp-siteimprove Jun 22, 2023
75a9878
Merge branch 'act-rules:develop' into develop
dan-tripp-siteimprove Aug 17, 2023
81caf8a
Adding examples to rule presentational-children-no-focusable-content-…
dan-tripp-siteimprove Aug 17, 2023
2928be6
Merge remote-tracking branch 'upstream/develop' into develop
dan-tripp-siteimprove Oct 27, 2023
5cd8b2c
Merge branch 'develop' of https://github.com/dan-tripp-siteimprove/ac…
dan-tripp-siteimprove Oct 27, 2023
092c849
removing Passed Example 15 because it's a duplicate.
dan-tripp-siteimprove Nov 9, 2023
f499d04
- adding frontmatter. (I originally copied this definition from http…
dan-tripp-siteimprove Nov 9, 2023
473bcb8
editing example: WAVE -> WCAG
dan-tripp-siteimprove Nov 9, 2023
5c7fc1e
Update pages/glossary/visible-inner-text.md
dan-tripp-siteimprove Nov 9, 2023
3d3b657
Update pages/glossary/visible-inner-text.md
dan-tripp-siteimprove Nov 9, 2023
8ed61b8
adding mention of innerText
dan-tripp-siteimprove Nov 9, 2023
24d0ffc
- removing mention of "the rule" from label-in-name-algorithm.md . r…
dan-tripp-siteimprove Nov 9, 2023
46294dd
adding preamble to label-in-name-algorithm.md which mentions what thi…
dan-tripp-siteimprove Nov 9, 2023
a141df8
visible-inner-text definition: now normalizing whitespace in the defi…
dan-tripp-siteimprove Nov 15, 2023
5220766
visible-inner-text: replacing "ASCII whitespace" with "ASCII space ch…
dan-tripp-siteimprove Nov 15, 2023
b2df021
adding passed example due to review at https://github.com/act-rules/a…
dan-tripp-siteimprove Nov 15, 2023
cde4ad4
handling review thread https://github.com/act-rules/act-rules.github.…
dan-tripp-siteimprove Nov 15, 2023
83d0e10
Merge branch 'act-rules:develop' into develop
dan-tripp-siteimprove Nov 24, 2023
5dce8e1
fixing failing test __tests__/link-reference-has-definition.js
dan-tripp-siteimprove Dec 13, 2023
2cfe5f8
fixing failing test _rules/__tests__/testcase-html-hint.js
dan-tripp-siteimprove Dec 13, 2023
7cdf8c3
fixing failing tests in __tests__/spelling.js
dan-tripp-siteimprove Dec 13, 2023
563ff5e
fixing more failing tests in __tests__/spelling.js
dan-tripp-siteimprove Dec 13, 2023
53fe350
fixing more failing tests in __tests__/spelling.js
dan-tripp-siteimprove Dec 13, 2023
821de81
more fixing of failing test(s) in __tests__/spelling.js
dan-tripp-siteimprove Dec 13, 2023
f9e7272
adding glossary definition inlined section.
dan-tripp-siteimprove Feb 5, 2024
ae2273a
changing example to match kathy's recent merged PR
dan-tripp-siteimprove Feb 5, 2024
d4f8076
adding failed example to emphasize that a word in the middle will cau…
dan-tripp-siteimprove Feb 5, 2024
2dcd941
.
dan-tripp-siteimprove Feb 5, 2024
09f668c
Merge branch 'act-rules:develop' into develop
dan-tripp-siteimprove Feb 6, 2024
a37cfd3
Merge remote-tracking branch 'origin/develop' into rule-2ee8b8-may-2023
dan-tripp-siteimprove Feb 6, 2024
22ad17b
Fixing mistaken branch/merge.
dan-tripp-siteimprove Feb 6, 2024
2dc429f
fixing failing test spelling.js / retext-repeated-words
dan-tripp-siteimprove Feb 7, 2024
2ab4489
Adding some clarity to the algorithm's wording.
dan-tripp-siteimprove Feb 7, 2024
db37b3b
fixing failing test spelling.js
dan-tripp-siteimprove Feb 7, 2024
7b2a053
Visible inner text: handling some uncommon whitespace / visibility ca…
dan-tripp-siteimprove Apr 10, 2024
9723ed1
- adding assumption to handle spelling and hyphenation. because of h…
dan-tripp-siteimprove Jul 25, 2024
4da5300
Assumptions:
dan-tripp-siteimprove Sep 26, 2024
5617755
Merge branch 'develop' into rule-2ee8b8-may-2023
daniel-montalvo Feb 18, 2025
6be702c
Put back removed exceptions
daniel-montalvo Feb 18, 2025
0d4c543
Add missing exxception
daniel-montalvo Feb 18, 2025
a959b09
minor rewording. based on review.
dan-tripp-siteimprove Feb 19, 2025
f1219c8
Adding an assumption about round brackets and the human language. As…
dan-tripp-siteimprove Feb 24, 2025
f9850c8
Fixing typo.
dan-tripp-siteimprove Feb 24, 2025
b77023c
Update _rules/visible-label-in-accessible-name-2ee8b8.md
dan-tripp-siteimprove Mar 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/ISSUE_TEMPLATE/rules-issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ about: issues related with ACT Rules
title: ''
labels: ''
assignees: ''

---

Please describe the issue with references and relevant examples where necessary.
---Please describe the issue with references and relevant examples where necessary.

--- or ---

Expand Down
16 changes: 15 additions & 1 deletion __tests__/spelling-ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
- ozplayer
- GitHub

# Test case anamolies
# Test case anomalies
- brewitt-taylor
- level2-frame1
- level1-frame2
Expand All @@ -146,6 +146,9 @@
- Sumei
- Tuttle
- lnik # intentional misspelling
- ngizmo
- nspecification
- thelabel

# Attributes (repeated words with casing as retext-spell has no config to ignore casing)
- href
Expand Down Expand Up @@ -175,6 +178,9 @@
- x1
- y1

# HTML character references
- nbsp

# DOM Events
- auxclick
- compostionend
Expand Down Expand Up @@ -241,6 +247,12 @@
- disambiguated
- superclass
- grey
- substring
- initialisms
- sublist
- tokenize
- tokenized
- subsequence

# Parts of Unicode
- 000A
Expand All @@ -250,6 +262,8 @@
- 4E00
- 9FFF
- 4E00–9FFF
- 00A0
- KD

# JSON attributes/ metadata/ methods
- testcases
Expand Down
4 changes: 3 additions & 1 deletion __tests__/spelling.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ function getCuratedMarkdownBody(body, options = {}) {
* @returns {String[]}
*/
function getSpellIgnored() {
const ignoreConfigured = yaml.safeLoad(fs.readFileSync('./__tests__/spelling-ignore.yml', 'utf8'), {schema: yaml.FAILSAFE_SCHEMA}) //added schema due to entries starting with a non-zero digit
const ignoreConfigured = yaml.safeLoad(fs.readFileSync('./__tests__/spelling-ignore.yml', 'utf8'), {
schema: yaml.FAILSAFE_SCHEMA,
}) //added schema due to entries starting with a non-zero digit

/*
Building spelling exception in the shape FOOxxx where xxx is a number.
Expand Down
9 changes: 7 additions & 2 deletions _rules/aria-state-or-property-permitted-5c01ea.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,13 @@ This `div` element has an [explicit role][] of `switch`; the `aria-required` [pr
```html
<div role="switch" aria-checked="false" tabindex="0" aria-required="true">
<span class="label">Notifications</span>
<span class="switch" style="position: relative; display: inline-block; top: 6px; border: 2px solid black; border-radius: 12px; height: 20px; width: 40px;">
<span style="position: absolute; top: 2px; left: 2px; display: inline-block; border: 2px solid black; border-radius: 8px; height: 12px; width: 12px; background: black;"></span>
<span
class="switch"
style="position: relative; display: inline-block; top: 6px; border: 2px solid black; border-radius: 12px; height: 20px; width: 40px;"
>
<span
style="position: absolute; top: 2px; left: 2px; display: inline-block; border: 2px solid black; border-radius: 8px; height: 12px; width: 12px; background: black;"
></span>
</span>
<span class="on" aria-hidden="true" style="display: none;">On</span>
<span class="off" aria-hidden="true">Off</span>
Expand Down
60 changes: 30 additions & 30 deletions _rules/focusable-no-keyboard-trap-standard-nav-a1b64e.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,43 +88,43 @@ use [standard keyboard navigation](#standard-keyboard-navigation) using the Esca
```html
<div>Main page content with <a href="#">some link</a></div>
<div aria-hidden="true">
<a href="#" id="sentinelBefore" style="position:absolute; top:-999em"
>Upon receiving focus, this focus sentinel should wrap focus to the bottom of the modal</a
>
<a href="#" id="sentinelBefore" style="position:absolute; top:-999em"
>Upon receiving focus, this focus sentinel should wrap focus to the bottom of the modal</a
>
</div>
<div
id="sampleModal"
role="dialog"
aria-label="Sample Modal"
aria-modal="true"
style="border: solid black 1px; padding: 1rem;"
id="sampleModal"
role="dialog"
aria-label="Sample Modal"
aria-modal="true"
style="border: solid black 1px; padding: 1rem;"
>
<label>First and last name <input id="dialogFirst"/></label><br />
<button id="closeButton">Close button</button>
<label>First and last name <input id="dialogFirst"/></label><br />
<button id="closeButton">Close button</button>
</div>
<div aria-hidden="true">
<a href="#" id="sentinelAfter" style="position:absolute; top:-999em"
>Upon receiving focus, this focus sentinel should wrap focus to the top of the modal</a
>
<a href="#" id="sentinelAfter" style="position:absolute; top:-999em"
>Upon receiving focus, this focus sentinel should wrap focus to the top of the modal</a
>
</div>
<script>
window.addEventListener('load', () => {
document.getElementById('dialogFirst').focus();
})
document.getElementById('sentinelBefore').addEventListener('focus', () => {
document.getElementById('closeButton').focus()
})
document.getElementById('sentinelAfter').addEventListener('focus', () => {
document.getElementById('dialogFirst').focus()
})
document.getElementById('closeButton').addEventListener('click', () => {
document.getElementById('sampleModal').style.display = 'none'
})
document.getElementById('sampleModal').addEventListener('keydown', (evt) => {
if (evt.key === "Escape") {
document.getElementById('sampleModal').style.display = 'none';
}
})
window.addEventListener('load', () => {
document.getElementById('dialogFirst').focus()
})
document.getElementById('sentinelBefore').addEventListener('focus', () => {
document.getElementById('closeButton').focus()
})
document.getElementById('sentinelAfter').addEventListener('focus', () => {
document.getElementById('dialogFirst').focus()
})
document.getElementById('closeButton').addEventListener('click', () => {
document.getElementById('sampleModal').style.display = 'none'
})
document.getElementById('sampleModal').addEventListener('keydown', evt => {
if (evt.key === 'Escape') {
document.getElementById('sampleModal').style.display = 'none'
}
})
</script>
```

Expand Down
13 changes: 7 additions & 6 deletions _rules/scrollable-element-keyboard-accessible-0ssw9k.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ This rule applies to any [HTML element][] that has [visible][] [children][] in t

## Expectation

For each target element, at least one of the following is true:
- the element is included in [sequential focus navigation][]; or
For each target element, at least one of the following is true:

- the element is included in [sequential focus navigation][]; or
- the element has a [descendant][] in the [flat tree][] that is included in [sequential focus navigation][]; or
- the element is [inert][].

Expand Down Expand Up @@ -119,7 +120,7 @@ This [scrollable][] `section` element is [inert][] because of the modal dialog,
```html
<style>
dialog:-internal-dialog-in-top-layer::backdrop {
background: rgba(1, 1, 1, 0.8);
background: rgba(1, 1, 1, 0.8);
}
</style>
<section style="height: 100px; width: 500px; overflow: scroll;" tabindex="0">
Expand All @@ -144,11 +145,11 @@ This [scrollable][] `section` element is [inert][] because of the modal dialog,
</dialog>
<script>
const openDialog = () => {
ppDialog.showModal();
ppDialog.showModal()
myFrame.tabIndex = '-1'
}
ppDialog.addEventListener('close', () => myFrame.tabIndex = 0)
window.addEventListener('DOMContentLoaded', openDialog);
ppDialog.addEventListener('close', () => (myFrame.tabIndex = 0))
window.addEventListener('DOMContentLoaded', openDialog)
</script>
```

Expand Down
Loading