In the three cases that you requested, the screen reader needs at least two pieces of information: the role of the element and its accessible name.
For form fields, the role is determined by the type attribute. So, type = "radio" and type = "checkbox" respectively. For the title, the role is implied when using the h1-h6 element.
An accessible form field name is most often provided using the label element. For form fields, it will be something like this:
<input type="checkbox" id="red"> <label for="red">Red</label>
Note: validating the for / id attribute is important because it associates a label with a form field. Without this connection, the browser will not know that the label belongs to the form field.
For the title, the available name comes from the text content of the element:
<h1>Favourite books</h1>
The browser provides information, such as a role and an accessible name, for reading from the screen. In these examples, the screen reader would declare something like "Red checkbox" or "Favorite books heading level 1".
Leonie watson
source share