Repository navigation
Closed
Labels
Accessibilityissues related to accessibility (a11y)issues related to accessibility (a11y)area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: DOM renderingcore: basic template syntaxeffort1: hoursfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesfeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under considerationstate: Needs Design
Milestone
Description
As discussed in #630, it would be hugely valuable to validate role values against a list of allowed roles. It is a relatively fixed list–the ones we'd want to allow include widget, document, and landmark roles. Abstract roles should throw a warning along with invalid ones.
Some examples that should throw errors:
role="image"– Error, not a valid role. Should beimg.role="input"– Error, abstract roles cannot be used directly. Should betextbox.
Specifying valid replacements like img instead of image would add complexity but would be super helpful.
Roles to allow:
Widgets
-alert
- alertdialog
- button
- checkbox
- dialog
- gridcell
- link
- log
- marquee
- menuitem
- menuitemcheckbox
- menuitemradio
- option
- progressbar
- radio
- scrollbar
- slider
- spinbutton
- status
- tab
- tabpanel
- textbox
- timer
- tooltip
- treeitem
Composite Widgets
-combobox
- grid
- listbox
- menu
- menubar
- radiogroup
- tablist
- tree
- treegrid
Document Structure
-article
- columnheader
- definition
- directory
- document
- group
- heading
- img
- list
- listitem
- math
- note
- presentation
- region
- row
- rowgroup
- rowheader
- separator
- toolbar
Landmark Roles
-application
- banner
- complementary
- contentinfo
- form
- main
- navigation
- searchReacted by Joel "The Gregarious" Meador and Daisy Reynolds
Metadata
Metadata
Assignees
Labels
Accessibilityissues related to accessibility (a11y)issues related to accessibility (a11y)area: coreIssues related to the framework runtimeIssues related to the framework runtimecore: DOM renderingcore: basic template syntaxeffort1: hoursfeatureLabel used to distinguish feature request from other issuesLabel used to distinguish feature request from other issuesfeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under considerationstate: Needs Design
Activity
dylanb commentedon Feb 22, 2015
In order to avoid difficult to locate problems, Angular.js should
For 1 above, quoting from the spec:
Roles are element types and authors MUST NOT change role values over time or with user actions. Authors wishing to change a role MUST do so by deleting the associated element and its children and replacing it with a new element with the appropriate role.
http://www.w3.org/TR/wai-aria/roles
For 3 above - the following is invalid menu markup
Whereas this is valid markup because all interim structures in the hierarchy have been annotated with role="presentation"
7 remaining items
angular-robot commentedon May 21, 2021
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
angular-robot commentedon Jun 10, 2021
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
[-]Verify role against a whitelist of allowed roles[/-][+]Verify role against a list of allowed roles[/+]petebacondarwin commentedon Sep 3, 2021
Following on from @marcysutton's comment above, this kind of checking should probably be done by a tool like Axe.
angular-automatic-lock-bot commentedon Oct 4, 2021
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.