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
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.