3

I am new to WAI-ARIA. I want to know how can we create a custom role based on the existing roles.

For example, i want to create a custom button role from aria button role. It will be great, if any one provide steps to do so.

1 Answers1

4

Custom roles are not supported in WAI-ARIA 1.0, although there is infrastructure within ARIA that could support this in future. From https://www.w3.org/TR/wai-aria-1.0/roles:

5. The Roles Model

[...]

The RDF/OWL taxonomy may be used as a vehicle to extend WAI-ARIA in the future or by tool manufacturers to validate states and properties applicable to roles per this specification.

For now, stick to the closest defined role; likely button in your case.

In your case, what is it about your button that requires a custom role? How does it differ in behavior from a regular button?

neiya
  • 2,657
  • 4
  • 23
  • 32
BrendanMcK
  • 14,252
  • 45
  • 54