Prerequisite:
Aria is used to improve the user experience of visually impaired users. Visually impaired users navigate though application using screen reader software like JAWS, NVDA,.. While navigating through the application, screen reader software announces content to users. Aria can be used to add content in the code which helps screen reader users understand role, state, label and purpose of the control
Aria does not change anything visually. (Aria is scared of designers too).
role
role attribute is used to communicate the type of element to screen reader users.
role = "button" communicates to screen reader users that it is a button.
role = "dialog" communicates to screen reader users that it is a modal dialog.
More on roles https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
aria-labelledby
Both aria-label and aria-labelledby is used to communicate the label. But aria-labelledby can be used to reference any label already present in the page whereas aria-label is used to communicate the label which is not displayed visually
Eg:
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
When modal dialog box receives focus, "Modal title" is announced to screen reader users. aria-labelledby has value same as the id value of <h4>
making the label of dialog box to content in <h4>
aria-hidden:
aria-hidden attribute is used to hide content for visually impaired users who navigate through application using screen readers (JAWS, NVDA,...).
aria-hidden attribute is used with values true, false.
Eg:
<i class = "fa fa-books" aria-hidden = "true"></i>
using aria-hidden = "true" on the <i>
hides content to screen reader users with no visual change in the application.