File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Standards/WCAG2AAA/Sniffs/Principle4/Guideline4_1 Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -205,9 +205,9 @@ _global.HTMLCS_WCAG2AAA_Sniffs_Principle4_Guideline4_1_4_1_2 = {
205205 var matchingRequiredNames = requiredNames [ nodeName ] ;
206206 var requiredValue = requiredValues [ nodeName ] ;
207207
208- // Any element that doesn't have specific handling must have content.
208+ // Any element that doesn't have specific handling must have content or aria labels .
209209 if ( ! matchingRequiredNames && nodeName !== 'input_hidden' ) {
210- matchingRequiredNames = [ '_content' ] ;
210+ matchingRequiredNames = [ '_content' , '@aria-label' , '@aria-labelledby' ] ;
211211 }
212212
213213 // Check all possible combinations of names to ensure that one exists.
@@ -230,7 +230,6 @@ _global.HTMLCS_WCAG2AAA_Sniffs_Principle4_Guideline4_1_4_1_2 = {
230230 } else if ( requiredName . charAt ( 0 ) === '@' ) {
231231 // Attribute.
232232 requiredName = requiredName . substr ( 1 , requiredName . length ) ;
233-
234233 if ( ( requiredName === 'aria-label' || requiredName === 'aria-labelledby' ) && HTMLCS . util . hasValidAriaLabel ( element ) ) {
235234 break ;
236235 }
Original file line number Diff line number Diff line change 1313Assert: No Error *.H53.ARIA6 on #objectLabelledBy
1414Assert: No Error *.H53.ARIA6 on #objectLabel
1515Assert: No Error *.H91.A.NoContent on #hyperlinkLabel
16+ Assert: Error *.H91.* on #buttonRoleFail
17+ Assert: No Error *.H91.Name on #buttonRoleSuccess
1618-->
1719</ head >
1820< body >
4547
4648< a id ="hyperlinkLabel " href ="http://www.squiz.net " aria-label ="Label as valid content "> </ a >
4749
50+ < div role ="button " id ="buttonRoleFail "> </ div >
51+ < div role ="button " id ="buttonRoleSuccess " title ="Toggle time list " aria-label ="Toggle Time List " aria-controls ="myid "> </ div >
52+
4853</ form >
4954</ body >
5055</ html >
You can’t perform that action at this time.
0 commit comments