What are some special cases where custom markup is recommended over HTML? Also, how do I know the correct ARIA label if the element is unavailable in HTML?

Question

Are there special cases where custom markup is recommended over HTML? Also, how do I know the correct ARIA label if the element is unavailable in HTML?

Answer

Yes, there are special cases where custom markup is recommended, such as when it's not already provided as part of a native element. For example, custom menus or tables.

In terms of using the correct ARIA label, you should describe the element's functionality and give the user as much context as possible with the visible label. Also, ensure the accessible name matches the visible label. For example, elements such as a control or a close button represented by an "X" still require an accessible name representing their functionality.

Free Tools to Continue Learning

Accessible Web Company Logo

Accessible Web RAMP

Monitor your website and manage your progress towards WCAG conformance.

Accessible Web Company Logo

Accessible Web Academy

Career specific courses to help power up your accessibility knowledge.