Update the algorithm to handle roles where naming is not supported #53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a statement to the end of Step 1 ("initialize") stating that if the
root node's role doesn't support naming, return the empty string. At the
present time, this impacts nothing because all roles currently support
naming. If that changes within the ARIA spec, this modification is meant
to accomplish the following:
<span aria-label="bar">foo</span>
: The span has no name.<button><span aria-label="bar">foo</span></button>
: The button'saccessible name is "bar" (but the span itself has no name).
In other words, it prohibits generic elements themselves from getting
names, but preserves the name calculation results authors might be
expecting in currently-deployed content.