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

ngAria: tabIndex unnecessarily added to buttons & other interactive elements #11500

Closed
marcysutton opened this issue Apr 2, 2015 · 1 comment

Comments

@marcysutton
Copy link
Contributor

As it is currently written, ngAria is a bit too generous about adding tabindex="0" to elements. It adds the attribute to any element with ngModel or ngClick without checking whether it should actually do that. This includes buttons, inputs and other elements that might not need it. Adding unnecessary tabindex contributes to code bloat and is generally a poor practice.

@Narretz Narretz added this to the Backlog milestone Apr 2, 2015
@marcysutton marcysutton self-assigned this Apr 3, 2015
marcysutton added a commit to marcysutton/angular.js that referenced this issue Apr 22, 2015
marcysutton added a commit to marcysutton/angular.js that referenced this issue Apr 22, 2015
Apply ARIA attrs and tabindex more selectively

Closes angular#11500
marcysutton added a commit to marcysutton/angular.js that referenced this issue Jul 2, 2015
* Do not put tabindex on native controls using ng-model or ng-click
* Uses a single nodeBlacklist to limit which elements receive support

Closes angular#11500
marcysutton added a commit to marcysutton/angular.js that referenced this issue Aug 2, 2015
* Do not put tabindex on native controls using ng-model or ng-click
* Uses a single nodeBlacklist to limit which elements receive support

Closes angular#11500
marcysutton added a commit to marcysutton/angular.js that referenced this issue Aug 4, 2015
* Do not put tabindex on native controls using ng-model or ng-click
* Uses a single nodeBlacklist to limit which elements receive support

Closes angular#11500
@thebuilder
Copy link

This is still an issue on Radio buttons, where it sets tabindex to -1. The selected radio button gets 0, but this still prevents you from tabbing to the other radio buttons.
See: #12492 (comment)

marcysutton added a commit to marcysutton/angular.js that referenced this issue Oct 14, 2015
* Do not put tabindex on native controls using ng-model or ng-click
* Uses a single nodeBlacklist to limit which elements receive support

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

No branches or pull requests

3 participants