-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Prefer button subtree over
title
attribute (#811)
- Loading branch information
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
"dom-accessibility-api": patch | ||
--- | ||
|
||
Prefer button subtree over `title` attribute. | ||
|
||
```diff | ||
const name = computeAccessibleName(<button title="from-title">from-content</button>); | ||
-'from-title' === name | ||
+'from-content' === name | ||
``` | ||
|
||
`<button title="from-title">from-content</button>` would previously compute the accessible name "from-title". | ||
This is correct in ACCNAME 1.2 but is changed in the latest editors draft. | ||
The latest editors draft specifically refers to HTML-AAM which says that the subtree should take precedent over the `title` attribute. | ||
`computeAccessibleName` now calculates "from-content" as the accessible name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters