Skip to content
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

Resolving user agent must not statement and whitespace defs #1778

Merged
merged 4 commits into from
Aug 30, 2022

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Aug 18, 2022

Related to w3c/core-aam#128
Fixes #1476

  • link to definition of whitespace in the aria-braillelabel and aria-brailleroledescription, aria-roledescription sections
  • remove reference to whitespace from user agents must not aria-roledescription requirement
  • remove author error correction User Agents MUST NOT expose prohibited ARIA attributes statement from correcting for author errors section.
    • adds authors MUST NOT specify aria-roledescription on elements with roles where the attribute is prohibited.
    • removed non-normative "should" from aria-brailleroledescription
    • adds authors MUST NOT use aria-brailleroledescription where prohibited
    • adds authors MUST NOT use aria-label and aria-labelledby where prohibited

Preview | Diff

Related to w3c/core-aam#128 
Fixes #1476

- link to definition of whitespace in the aria-braillelabel and aria-brailleroledescription, aria-roledescription sections
- remove reference to whitespace from user agents must not aria-roledescription requirement
- remove author error correction User Agents MUST NOT expose prohibited ARIA attributes statement from correcting for author errors section.
	- adds authors MUST NOT specify aria-roledescription on elements with roles where the attribute is prohibited.
	- removed non-normative "should" from aria-brailleroledescription
	- adds authors MUST NOT use aria-brailleroledescription where prohibited 
	- adds authors MUST NOT use aria-label and aria-labelledby where prohibited
@spectranaut spectranaut requested review from cookiecrook, aleventhal, mcking65 and cyns and removed request for aleventhal August 18, 2022 17:10
@jnurthen
Copy link
Member

@jcsteh can you please review this.

index.html Outdated Show resolved Hide resolved
Copy link
Contributor

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving after comment threads resolved

index.html Outdated Show resolved Hide resolved
index.html Outdated
@@ -11932,7 +11933,7 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
<div class="property-description">
<p><a>Defines</a> a string value that labels the current element. See related <pref>aria-labelledby</pref>.</p>
<p>The purpose of <pref>aria-label</pref> is the same as that of <pref>aria-labelledby</pref>. It provides the user with a recognizable name of the object. The most common <a>accessibility <abbr title="Application Programing Interfaces">API</abbr></a> mapping for a label is the <a>accessible name</a> property.</p>
<p>If the label text is available in the DOM (i.e. typically visible text content), authors SHOULD use <pref>aria-labelledby</pref> and SHOULD NOT use <pref>aria-label</pref>. There may be instances where the name of an element cannot be determined programmatically from the DOM, and there are cases where referencing DOM content is not the desired user experience. Most host languages provide an attribute that could be used to name the element (e.g., the <code>title</code> attribute in [[HTML]]), yet this could present a browser tooltip. In the cases where DOM content or a tooltip is undesirable, authors MAY set the accessible name of the element using <pref>aria-label</pref>. As required by the <a href="#textalternativecomputation">accessible name and description computation</a>, user agents give precedence to <pref>aria-labelledby</pref> over <pref>aria-label</pref> when computing the accessible name property.</p>
<p>If the label text is available in the DOM (i.e. typically visible text content), authors SHOULD use <pref>aria-labelledby</pref> and SHOULD NOT use <pref>aria-label</pref>. There may be instances where the name of an element cannot be determined programmatically from the DOM, and there are cases where referencing DOM content is not the desired user experience. Most host languages provide an attribute that could be used to name the element (e.g., the <code>title</code> attribute in [[HTML]]), yet this could present a browser tooltip. In the cases where DOM content or a tooltip is undesirable, authors MAY set the accessible name of the element using <pref>aria-label</pref>, if the element does not <a href="#prohibitedattributes">prohibit</a> use of the attribute. Authors MUST NOT specify <code>aria-label</code> on an element which has an explicit or implicit WAI-ARIA role where <code>aria-label</code> is <a href="#prohibitedattributes">prohibited</a>. As required by the <a href="#textalternativecomputation">accessible name and description computation</a>, user agents give precedence to <pref>aria-labelledby</pref> over <pref>aria-label</pref> when computing the accessible name property.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the cases where DOM content or a tooltip is undesirable, authors MAY set the accessible name of the element using <pref>aria-label</pref>, if the element does not <a href="#prohibitedattributes">prohibit</a> use of the attribute. Authors MUST NOT specify <code>aria-label</code> on an element which has an explicit or implicit WAI-ARIA role where <code>aria-label</code> is <a href="#prohibitedattributes">prohibited</a>.

This felt redundant while reading... I looked back and realized it was not.

Reversing the two sentence may resolve it? E.g. list the rule first then exception, rather than exception before the rule.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made a commit to try to address this - 7f6baae

index.html Outdated Show resolved Hide resolved
scottaohara and others added 3 commits August 25, 2022 15:38
Co-authored-by: James Craig <[email protected]>
Co-authored-by: James Craig <[email protected]>
@cookiecrook does this reordering help?  I think it does, but just wanted to verify.  Thank you.
@jnurthen jnurthen merged commit 82bd83f into main Aug 30, 2022
github-actions bot added a commit that referenced this pull request Aug 30, 2022
SHA: 82bd83f
Reason: push, by @jnurthen

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
jnurthen pushed a commit that referenced this pull request Oct 10, 2023
- link to definition of whitespace in the aria-braillelabel and aria-brailleroledescription, aria-roledescription sections
- remove reference to whitespace from user agents must not aria-roledescription requirement
- remove author error correction User Agents MUST NOT expose prohibited ARIA attributes statement from correcting for author errors section.
- adds authors MUST NOT specify aria-roledescription on elements with roles where the attribute is prohibited.
- removed non-normative "should" from aria-brailleroledescription
- adds authors MUST NOT use aria-brailleroledescription where prohibited 
- adds authors MUST NOT use aria-label and aria-labelledby where prohibited
Co-authored-by: James Craig <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problematic User Agents MUST NOT statement needs to be qualified
4 participants