You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
A scenario has come up where $mdAria.expect('aria-label') throws an error where it shouldn't: when <md-icon> is nested inside of <md-button>, adding aria-label to the icon component still throws the error even though it has been made accessible. For example:
In this example, even though <md-icon aria-label="Refresh"> provides an accessible text alternative, a console warning is thrown for <md-button>. Note: <md-tooltip> is not visible until :hover or :focus interaction so it does not contribute an accessible name.
$mdAria.expect() should also check for child aria-label attributes. The only catch is that the child element with aria-label must be visible and in the DOM.
An alternative approach would be to require alternative text as an attribute on <md-icon> and copy it into a child node as textContent. That would allow $mdAria.expect to work as-is. See separate issue for <md-icon>: #427
The text was updated successfully, but these errors were encountered:
A scenario has come up where
$mdAria.expect('aria-label')
throws an error where it shouldn't: when<md-icon>
is nested inside of<md-button>
, addingaria-label
to the icon component still throws the error even though it has been made accessible. For example:In this example, even though
<md-icon aria-label="Refresh">
provides an accessible text alternative, a console warning is thrown for<md-button>
. Note:<md-tooltip>
is not visible until:hover
or:focus
interaction so it does not contribute an accessible name.$mdAria.expect()
should also check for childaria-label
attributes. The only catch is that the child element witharia-label
must be visible and in the DOM.An alternative approach would be to require alternative text as an attribute on
<md-icon>
and copy it into a child node as textContent. That would allow$mdAria.expect
to work as-is. See separate issue for<md-icon>
: #427The text was updated successfully, but these errors were encountered: