Test Page: .role and .aria-checked DOM properties
Accessibility problems exist when return values for .role
and .ariaChecked
are "undefined" or return a type that is not the same on every browser. Developers assume that DOM properties for ARIA roles, properties and states are consistent between browsers, and when they are not that causes accessibility problems.
Getting value of .ariaChecked
property
Setting Code |
Return value of .ariaChecked |
typeof.ariaChecked |
<div role='checkbox' aria-checked='true'> |
|
|
e.setAttribute('aria-checked', 'true'); |
|
|
e.ariaChecked = 'true'; (String) |
|
|
e.ariaChecked = true; (Boolean) |
|
|