Anyone knows anything about, how to implement accessibility in Angular 2 with Typescript?
Angular 2 has Accessibility (ARIA-enabled) feature, but I didn't find any kind of samples/examples, I searched a lot but didn't find anything. Does anyone know how to implement it?
You can use all aria attributes by using attribute binding:
<!-- create and set an aria attribute for assistive technology -->
<button [attr.aria-label]="actionName">{{actionName}} with Aria</button>
For example you can use the aria role attribute on a div container as shown below:
<div [attr.role]="ariaRole">
[attr.role] binds the role attribute to the result of expression ariaRole.
You can find all available aria-attributes here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With