aria-allowed-role

ARIA role must be appropriate for the element

Who might be affected
Screen Reader
Low Vision
Voice Control
Braille

Description

The purpose of ARIA roles is to enhance the "natural" HTML semantics. They are supposed to complete semantic UI concepts that are not part of the core language. Each role property can receive one of 70 optional values. Some represent a whole concept (like a header [banner], or a footer [contentinfo]), and some represent a component in a larger structure (for example, a menuitem within a menu element or an option within a selectbox). However, these 70 potential values are the only valid values for the "role" attribute. These are the valid values to use with the role attribute:

  1. button
  2. checkbox
  3. gridcell
  4. link
  5. menuitem
  6. menuitemcheckbox
  7. menuitemradio
  8. option
  9. progressbar
  10. radio
  11. scrollbar
  12. searchbox
  13. separator
  14. slider
  15. spinbutton
  16. switch
  17. tab
  18. tabpanel
  19. textbox
  20. treeitem
  21. combobox
  22. grid
  23. listbox
  24. menu
  25. menubar
  26. radiogroup
  27. tablist
  28. tree
  29. treegrid
  30. application
  31. article
  32. cell
  33. columnheader
  34. definition
  35. directory
  36. document
  37. feed
  38. figure
  39. group
  40. heading
  41. img
  42. list
  43. listitem
  44. math
  45. none
  46. note
  47. presentation
  48. row
  49. rowgroup
  50. rowheader
  51. table
  52. term
  53. toolbar
  54. tooltip
  55. banner
  56. complementary
  57. contentinfo
  58. form
  59. main
  60. navigation
  61. region
  62. search
  63. alert
  64. log
  65. marquee
  66. status
  67. timer
  68. alertdialog
  69. dialog

Quick Fixes

Ensure that all the role properties have a valid value (from the listed above). Notes:

  1. Please take into account that some role values require to be part of a particular semantic structure (i.e., it will have parent/child elements with a specific role)
  2. In case that none of the roles above fulfill the semantics that you are looking for, and the missing semantics is essential for the understanding of the content, you can try looking at the aria-roledescription property.

How Users Are Affected

Assistive technologies usually ignore invalid role values, so their users might not perceive the whole meaning or purpose of the elements they are assigned to.

WCAG Success criteria

This issue might cause elements to fail one or more of the following Success criteria:
4.1.2 Name, role, value (A)