Skip to content

use preferred wording introduced in aria-description PR - #1149

Merged
jnurthen merged 3 commits into
masterfrom
editorial-aria-label
Jan 23, 2020
Merged

use preferred wording introduced in aria-description PR#1149
jnurthen merged 3 commits into
masterfrom
editorial-aria-label

Conversation

@carmacleod

@carmacleod carmacleod commented Jan 9, 2020

Copy link
Copy Markdown
Contributor

When saying what determines when to use aria-labelledby over aria-label, use:

If the label text is available in the DOM,

instead of:

If the label text is visible on screen,


Preview | Diff

@carmacleod carmacleod mentioned this pull request Jan 9, 2020
@jnurthen
jnurthen self-requested a review January 16, 2020 18:22
@scottaohara
scottaohara self-requested a review January 16, 2020 18:22
@carmacleod
carmacleod removed the request for review from curtbellew January 16, 2020 18:22
@jnurthen
jnurthen requested a review from curtbellew January 16, 2020 18:22
@aleventhal
aleventhal self-requested a review January 16, 2020 18:23
Comment thread index.html Outdated

@scottaohara scottaohara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM aside from the extra spaces in the source code :)

@jongund

jongund commented Jan 16, 2020

Copy link
Copy Markdown
Contributor

Seems to mix "in the DOM" and "visible label: references:

Here is a suggested edit:
If the label text is available in the DOM (i.e. typically visible text content), authors SHOULD use aria-labelledby and SHOULD NOT use aria-label. 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 title 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 aria-label. As required by the accessible name and description computation, user agents give precedence to aria-labelledby over aria-label when computing the accessible name property.

@jongund jongund left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jnurthen I added a comment on some suggested wording, the current pull request starts out with "in the DOM" and the switches to "Visible Text", seems like we should be more consistent in how we refer to aria-labelledby content.

@carmacleod

Copy link
Copy Markdown
Contributor Author

Good catch, @jongund. Thanks for reading the whole paragraph. I've committed your suggested text.

@carmacleod
carmacleod requested a review from jongund January 16, 2020 19:59
@jnurthen
jnurthen merged commit 6ec58d5 into master Jan 23, 2020
carmacleod added a commit that referenced this pull request May 7, 2020
* use "DOM content" instead of "visible text" to describe what aria-labelledby points to
jnurthen pushed a commit that referenced this pull request Jul 28, 2020
* use "DOM content" instead of "visible text" to describe what aria-labelledby points to
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.

6 participants