-
-
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: Consider
<label />
when computing the accessible name of `<out…
…put />` (#666)
- Loading branch information
Showing
3 changed files
with
41 additions
and
23 deletions.
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,15 @@ | ||
--- | ||
"dom-accessibility-api": patch | ||
--- | ||
|
||
Consider `<label />` when computing the accessible name of `<output />` | ||
|
||
Given | ||
|
||
```html | ||
<label for="outputid">Output Label</label> <output id="outputid"></output> | ||
``` | ||
|
||
Previously the accessible name of the `<output />` would ignore the `<label />`. | ||
However, an [`<output />` is labelable](https://html.spec.whatwg.org/#the-output-element) and therefore the accessible name is now computed using `<label />` elements if they exists. | ||
In this example the accessible name is `"Output Label"`. |
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