File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/compiler/phases/2-analyze/visitors/shared
tests/validator/samples/a11y-consider-explicit-label Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -999,7 +999,9 @@ export function check_element(node, context) {
999999 const is_labelled = attribute_map . has ( 'aria-label' ) || attribute_map . has ( 'aria-labelledby' ) ;
10001000
10011001 if ( node . name === 'a' || node . name === 'button' ) {
1002- const is_hidden = get_static_value ( attribute_map . get ( 'aria-hidden' ) ) === 'true' ;
1002+ const is_hidden =
1003+ get_static_value ( attribute_map . get ( 'aria-hidden' ) ) === 'true' ||
1004+ get_static_value ( attribute_map . get ( 'inert' ) ) ;
10031005
10041006 if ( ! has_spread && ! is_hidden && ! is_labelled && ! has_content ( node ) ) {
10051007 w . a11y_consider_explicit_label ( node ) ;
Original file line number Diff line number Diff line change 55<a href =" /#" aria-label =" Valid empty link" ></a >
66
77<button aria-hidden =' true' ></button >
8+ <button inert ></button >
89<a href =" /#" aria-hidden =' true' ><b ></b ></a >
910
1011<button >Click me</button >
You can’t perform that action at this time.
0 commit comments