Verify role against a list of allowed roles
See original GitHub issueAs 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
- search
Issue Analytics
- State:
- Created 9 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Verify scopes and app roles protected web API - Microsoft Entra
Verify that the API is only called by applications on behalf of users who have the right scopes and by daemon apps that...
Read more >Spring Security: Check If a User Has a Role in Java | Baeldung
The first way to check for user roles in Java is to use the @PreAuthorize annotation provided by Spring Security. This annotation can...
Read more >Security: User roles, accounts, and permissions - IBM
Authorization checks the permissions of the authenticated user and controls access to functions based on the roles that are assigned to the user....
Read more >How to make a Discord verification system (2021) - YouTube
Discord verification system easy (carl bot)! I will explain How to make a Discord verification system (2021) for your discord server.
Read more >Granting a user permissions to pass a role to an AWS service
The service then checks whether that user has the iam:PassRole permission. To limit the user to passing only approved roles, you can filter...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
@splincode at this point it’s probably easier to integrate a tool like axe-core and its existing ARIA infrastructure into the Angular CLI or build system than to maintain a list of allowed roles in Angular. It’s a question of whether this should be done at runtime or build time…I wouldn’t think Angular would want to ship all the code for accessibility testing over the wire, so build time is probably better for accessibility testing. It could be run on save, in the test suite and in CI. I have some materials on doing that: http://marcysutton.github.io/a11y-testing-with-angular/#/
There’s also an issue open to integrate axe-core into Angular.io: https://github.com/angular/angular/issues/21969