File tree Expand file tree Collapse file tree
Standards/WCAG2AAA/Sniffs/Principle4/Guideline4_1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,11 +136,13 @@ _global.HTMLCS_WCAG2AAA_Sniffs_Principle4_Guideline4_1_4_1_2 = {
136136 } //end if
137137 } else {
138138 if ( nameFound === false ) {
139- // Href provided, but no content or title .
139+ // Href provided, but no content, title or valid aria label .
140140 // We only fire this message when there are no images in the content.
141141 // A link around an image with no alt text is already covered in SC
142142 // 1.1.1 (test H30).
143- if ( element . querySelectorAll ( 'img' ) . length === 0 ) {
143+ if ( element . querySelectorAll ( 'img' ) . length === 0
144+ && HTMLCS . util . hasValidAriaLabel ( element ) === false
145+ ) {
144146 errors . noContent . push ( element ) ;
145147 }
146148 } //end if
Original file line number Diff line number Diff line change 1212Assert: Error *.H53.ARIA6 on #objectNoLabel
1313Assert: No Error *.H53.ARIA6 on #objectLabelledBy
1414Assert: No Error *.H53.ARIA6 on #objectLabel
15+ Assert: No Error *.H91.A.NoContent on #hyperlinkLabel
1516-->
1617</ head >
1718< body >
4243
4344< object id ="objectLabel " data ="x.jpg " aria-label ="monkey "> </ object >
4445
46+ < a id ="hyperlinkLabel " href ="http://www.squiz.net " aria-label ="Label as valid content "> </ a >
47+
4548</ form >
4649</ body >
4750</ html >
You can’t perform that action at this time.
0 commit comments