Accessible Name Calculation
Last updated: 7 October 2023
Just a cheat sheet.
Although the title-attribute is mentioned here, it is better not to use it.
Algorithm for names
aria-labelledbyaria-label<label>(for form controls)placeholder(for text form controls)figcaption(for figure elements)alt(for img or area elements)<caption>(for table elements)<legend>(for fieldset elements)- text contents (if exists in this role)
value(for input form controls with type of button, submit, or reset)titlebadly supported by broswers and screenreaders
Algorithm for descritions
aria-describedbytitleplaceholder(for a text form control)
<input>
aria-labelledbyaria-label- geassocieerde
<label> placeholder(only when text input involved)title- no accessible name
button
except type=submit and type=reset
aria-labelledbyaria-labelvalue(not for button-element)title- no accessible name
<a href
aria-labelledbyaria-label- subtree of
<a> titlesummary- no accessible name
input type="image"
aria-labelledbyaria-labelaltvalue- named by user agent in case of "Submit Query"
title- no accessible name
<img>
aria-labelledbyaria-labelalttitle- no accessible name
<table>
aria-labelledbyaria-label<caption>titlesummary- no accessible name
What's my name?
<bla role="button" aria-label="name1" aria-labelledby="name2">
<span id="name2">Name3</span>
<div id="content">
Name4
</div>
</bla>



