aria-label, aria-labelledby and aria-describedby: very unforeseeable behaviour in screenreaders

前端 未结 1 1116
眼角桃花
眼角桃花 2020-12-31 23:52

I just noticed that although the aria-label, aria-labelledby and aria-describedby attributes are said to work on every element (see ht

相关标签:
1条回答
  • 2021-01-01 00:06

    ARIA does not define how assistive tech are to expose UI. It does define how browsers are required to expose roles, states and properties via accessibility APIs. It's the same with HTML in general, the HTML spec does not define/require UI, that is left up to the browsers to decide. In the case of aria-label (for example) it is a requirement in ARIA that aria-label is mapped to the accessible name property in accessibility APIs, it is not a requirment that screen readers announce it, or not, on any given element (i.e. expose as part of the aural UI). General observed rule is that screen readers will announce accessible names and accessible descriptions on interactive elements. They will announce accessible names on most grouping elements and sectioning elements. They will announce neither on most text level elements.

    Note: the above also applies to any element that has it's default semantics overidden with ARIA roles. For example ARIA widget roles will have both acc name and description announced, like native HTML interactive elements.

    0 讨论(0)
提交回复
热议问题