-
Notifications
You must be signed in to change notification settings - Fork 138
Add namefrom: heading. #2650
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
base: main
Are you sure you want to change the base?
Add namefrom: heading. #2650
Changes from 2 commits
17750f7
d0e22a5
b19f0b9
47ef934
0fcaeec
30a7f56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1265,15 +1265,27 @@ <h3>Name From</h3> | |
| having the lowest precedence for specifying a text alternative. | ||
| </li> | ||
| <li> | ||
| contents: name comes from the text value of the <a>element</a> node. Although this might be allowed in addition to "author" in some <a>roles</a>, this is used in content only if higher | ||
| priority "author" features are not provided. Priority is defined by the <cite><a href="" class="accname">Accessible Name and Description Computation</a></cite> [[ACCNAME-1.2]]. | ||
| heading: name comes from the text alternative of the first descendant <a>element</a> node (depth first search) matching the role of <code>heading</code> as defined in the AccName | ||
cookiecrook marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| computation algorithm for nameFrom: heading. Although "namefrom: heading" is allowed in addition to "namefrom: author" in some <a>roles</a>, "namefrom: heading" is used in content only | ||
| if higher priority "namefrom: author" features are not provided. Priority is defined by the <cite><a href="" class="accname">Accessible Name and Description Computation</a></cite> | ||
| [[ACCNAME-1.2]]. | ||
| </li> | ||
| <li> | ||
| contents: name comes from the text value of the <a>element</a> node. Although this might be allowed in addition to "namefrom: author" or "namefrom:heading" in some <a>roles</a>, this | ||
| is used in content only if higher priority "namefrom: author" or "namefrom: heading" features are not provided. Priority is defined by the <cite><a href="" class="accname">Accessible | ||
| Name and Description Computation</a></cite> [[ACCNAME-1.2]]. | ||
| </li> | ||
| <li>Priority is defined by the <cite><a href="" class="accname">Accessible Name and Description Computation</a></cite> [[ACCNAME-1.2]].</li> | ||
| <li>prohibited: the element does not support name from author. Authors MUST NOT use the <pref>aria-label</pref> or <pref>aria-labelledby</pref> attributes to name the element.</li> | ||
| </ol> | ||
| <section id="namefromauthor"> | ||
| <h4>Roles Supporting Name from Author</h4> | ||
| <div id="index_fromauthor"></div> | ||
| </section> | ||
| <section id="namefromheading"> | ||
| <h4>Roles Supporting Name from Heading</h4> | ||
| <div id="index_fromheading"></div> | ||
| </section> | ||
| <section id="namefromcontent"> | ||
| <h4>Roles Supporting Name from Content</h4> | ||
| <div id="index_fromcontent"></div> | ||
|
|
@@ -1670,7 +1682,12 @@ <h2>Definition of Roles</h2> | |
| </tr> | ||
| <tr> | ||
| <th class="role-namefrom-head" scope="row">Name From:</th> | ||
| <td class="role-namefrom">author</td> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reviewer context: this is on the |
||
| <td class="role-namefrom"> | ||
| <ul> | ||
| <li>author</li> | ||
| <li>heading</li> | ||
| </ul> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <th class="role-namerequired-head" scope="row">Accessible Name Required:</th> | ||
|
|
@@ -1886,7 +1903,12 @@ <h2>Definition of Roles</h2> | |
| </tr> | ||
| <tr> | ||
| <th class="role-namefrom-head" scope="row">Name From:</th> | ||
| <td class="role-namefrom">author</td> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reviewer context: this is on the |
||
| <td class="role-namefrom"> | ||
| <ul> | ||
| <li>author</li> | ||
| <li>heading</li> | ||
| </ul> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <th class="role-namerequired-head" scope="row">Accessible Name Required:</th> | ||
|
|
@@ -3631,7 +3653,7 @@ <h2>Definition of Roles</h2> | |
| focus to dialogs. See the <a href="https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/">WAI-ARIA Authoring Practices: Dialog (modal) pattern</a> for additional details on implementing | ||
| modal dialog design patterns. | ||
| </p> | ||
| <p>Authors SHOULD provide an accessible name for a dialog, which can be done with the <pref>aria-label</pref> or <pref>aria-labelledby</pref> attribute.</p> | ||
| <p>Authors SHOULD provide an accessible name for a dialog, using either <a href="#namecalculation">namefrom</a>: author or <a href="#namecalculation">namefrom</a>: heading.</p> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given a dialog that contains an
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the AccName computation prioritizes
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The direct author reference is probably slightly more performant, but I don't think a change is needed here unless you have one to suggest.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a personal clarification to make sure I'm using this new nameFrom technique properly 😄 |
||
| <p> | ||
| Authors SHOULD ensure that all dialogs (both modal and non-modal) have at least one <a>focusable</a> descendant element. Authors SHOULD focus an element in the modal dialog when it is | ||
| displayed, and authors SHOULD constrain keyboard focus to focusable elements within a modal dialog, until dismissed. | ||
|
|
@@ -3721,7 +3743,12 @@ <h2>Definition of Roles</h2> | |
| </tr> | ||
| <tr> | ||
| <th class="role-namefrom-head" scope="row">Name From:</th> | ||
| <td class="role-namefrom">author</td> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reviewer context: this is on the |
||
| <td class="role-namefrom"> | ||
| <ul> | ||
| <li>author</li> | ||
| <li>heading</li> | ||
| </ul> | ||
| </td> | ||
| </tr> | ||
| <tr> | ||
| <th class="role-namerequired-head" scope="row">Accessible Name Required:</th> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.