The aria-label attribute in HTML is used to provide an accessible name or label for an element that does not have an inherent label or that needs a more descriptive label than its content provides. This attribute can be used with any element that accepts the aria-label attribute. For exampl...
and there are cases where providing a visible label is not the desired user experience. Most host languages provide an attribute that could be used
aria-label attribute: Set to the accessible name string. title attribute: Set to the accessible name string (also create a tooltip).ExampleHTML Copy <!-- For landmark tags, set the accessible name by using the aria-labelledby attribute to reference the visible headers. --> <h1 id="form...
TheW3C specprohibits the usage of thetitleattribute when there is anaria-label: The last resort is to use text from a tooltip attribute (such as the title attribute in HTML). This is used only if nothing else, including subtree content, has provided results. ...
`input type=text` with `aria-label` attribute - screen reader compatibility in JAWS, NVDA and VoiceOver.
objectwitharia-labelattributeScreen reader compatibility ARIAHTMLWCAG Nov 26, 2024 Expected Result: works in a screen reader Actual Result: causes problems in 35 screen reader / browser combinations Browsers stopped displaying Flash content when Flash reached end-of-life in December 2020. ...
The button is focused and its name (as set by the title attribute) changes. Whether or not it's a live region, we would report the change in that case. While I understand this is a distilled test case, there's no good "real world" reason to make a focused button a live region, ...
aria-label 是一個 HTML attribute,用來告訴讀屏軟件某個元素是什麼,提升 Web Accessibility。 「前端的基礎修養」是我擬寫的一系列文章的總標題。所以喚作「修養」,大抵因為心虛,覺得沒有什麼技術含量,不便言之技術。這一系列會以亂序呈現,同一主題的文章會穿插出現。