Links components (e.g. 'Footer links') can not be tabbed to #6305
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 no. 34 from #5277
Description
It appears that since the release of v8 some of the original directive attributes for "openUrl", "removeUrl" and "editUrl" have been removed - At least they don't return any values anymore, which make the
<a>
act like a placeholder link, which will not receive keyboard focus until there is ahref
attribute present.I had a brief chat with @abjerner about this since the history revealed that he introduced the mentioned options with the release of Umbraco 7.12.0 and he explained the intention so instead of removing the
<a>
I have added a check to decide whether the control should be wrapped in<a>
or<button>
. If the attributes mentioned are falsy we will render a<button>
.This means that the "Edit", "Open" and "Remove" options are now keyboard accessible again and if the mentioned options are added at a later stage the
<a>
will be used instead since it then should act like a link 👍The aria attributesaria-haspopup
andaria-expanded
have been added and the umbnodepreview.directive.js has been updated with some options to add these values.For the "Open" option I have only added thearia-haspopup
attribute for now since the way the infinifte open/close works makes it harder to set the proper true/false value foraria-expanded
so will need to have another think about the approach for dealing with this issue.I realized that I was using the aria-haspopup/aria-extended in the wrong context here. It's meant for exposing menus and not dialogs.
The aria-haspopup attribute was updated so it can take the value "dialog" but support is probably not that widespread among screen readers yet. When testing with NVDA nothing is announced so I think it should be ok to leave it in so screen readers will pick it up once they have support for it.
Before
After