Links components (e.g. 'Footer links'), 'Add' is identfied as "Add link" but doesn't identify the label #6304
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.
Prerequisites
This fixes issue 37 from #5277
Description
Unfortunately I can't illustrate the changes with any kind of graphics for this one 😄
The following is what has been done
<a>
to<button>
- Theprevent-default
directive has been removed since addingtype="button"
is enough to avoid form submission of any potential outer form the element may be wrapped insideid
attribute so the label with the property name is connected/attached to thebutton
- This is not possible when using<a>
for instance but there are many reasons to why<a>
should not be used in this casearia-label
and then concatenating the two strings like in this snippetaria-label="{{model.label}}: {{labels.general_add}}"
- This will make the screen reader say "Call to action button: Add" indicating what action to expectSince the "Add" button will trigger a popuparia-haspopup
andaria-expanded
attributes have been added as well indicating that a popup will be triggered and whether it's expanded or notaria-haspopup="dialog"
is what should be used instead since it has been added to the spec - The other combination is suited for when dealing with menus, which we are not in this scenario hence the change. Not all screen readers may have implemented support for using "dialog" but I suspect that if they don't understand the value then they don't announce anything. At least that is what NVDA appears to be doing.