Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Allow for ngAria to ignore specific elements #14602

Closed
psaniko opened this issue May 12, 2016 · 5 comments
Closed

Allow for ngAria to ignore specific elements #14602

psaniko opened this issue May 12, 2016 · 5 comments

Comments

@psaniko
Copy link

psaniko commented May 12, 2016

It would be great if there was a flag/directive to apply to elements to exclude them from being altered by ngAria.

What is the current behavior?
We include a non-native element with ng-model (angular-ui/ui-select) which gets a tabindex="0" automatically added by ngAria. Since the actual input is encapsulated within the ng-model div, you'd have to tab twice to get to the element.

@Narretz
Copy link
Contributor

Narretz commented May 13, 2016

Can't you set the tabindex on the element yourself?

@gkalpak
Copy link
Member

gkalpak commented May 13, 2016

Indeed, if it's only about the tabindex, you can manually set it. ngAria can do a lot more stuff (such as adding aria-invalid, aria-required, role etc), so if there is a strong usecase, we might consider having a flag attribute to disable ngAria on a specific element.

You could of course do it yourself :) Demo pen

@psaniko
Copy link
Author

psaniko commented May 17, 2016

As it is an external plugin we would have to fork it or force a negative tabindex via DOM manipulation. Thanks for your codepen @gkalpak! We'll try that out once the ticket is due for completion :)

@gkalpak
Copy link
Member

gkalpak commented May 25, 2016

Loosely related to #14672.

@stowball
Copy link

I 100% agree with needing the ability to able to exclude specific elements from being enhanced by ngAria.

I have recently built a complex, bar chart type layout, which has a <button> for the axis label for accessibility, but the whole "row" of the bar chart needs to be mouse clickable. So currently, I have a fake [role="button"] wrapping a real <button>, which is bad for accessibility as raised by @marcysutton in #14672.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants