File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import {
3131 is_interactive_roles ,
3232 is_hidden_from_screen_reader ,
3333 is_semantic_role_element ,
34- may_contain_input_child
34+ contains_input_child
3535} from '../utils/a11y' ;
3636
3737const aria_attributes = 'activedescendant atomic autocomplete busy checked colcount colindex colspan controls current describedby description details disabled dropeffect errormessage expanded flowto grabbed haspopup hidden invalid keyshortcuts label labelledby level live modal multiline multiselectable orientation owns placeholder posinset pressed readonly relevant required roledescription rowcount rowindex rowspan selected setsize sort valuemax valuemin valuenow valuetext' . split ( ' ' ) ;
@@ -788,7 +788,7 @@ export default class Element extends Node {
788788
789789 if ( this . name === 'label' ) {
790790 const rule_options = component . compile_options . a11y ?. rules ?. [ 'label-has-associated-control' ] ;
791- if ( ! attribute_map . has ( 'for' ) && ! may_contain_input_child ( this , rule_options ) ) {
791+ if ( ! attribute_map . has ( 'for' ) && ! contains_input_child ( this , rule_options ) ) {
792792 component . warn ( this , compiler_warnings . a11y_label_has_associated_control ) ;
793793 }
794794 }
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { TemplateNode } from '../../interfaces';
1212import compiler_errors from '../compiler_errors' ;
1313import compiler_warnings from '../compiler_warnings' ;
1414import { regex_only_whitespaces } from '../../utils/patterns' ;
15- import { may_contain_input_child } from '../utils/a11y' ;
15+ import { contains_input_child } from '../utils/a11y' ;
1616
1717export default class InlineComponent extends Node {
1818 type : 'InlineComponent' ;
@@ -173,7 +173,7 @@ export default class InlineComponent extends Node {
173173 validate ( ) {
174174 const label_has_associated_control_rule_options = this . component . compile_options . a11y ?. rules ?. [ 'label-has-associated-control' ] ;
175175 if ( label_has_associated_control_rule_options ?. labelComponents ?. includes ( this . name ) ) {
176- if ( ! may_contain_input_child ( this , label_has_associated_control_rule_options ) ) {
176+ if ( ! contains_input_child ( this , label_has_associated_control_rule_options ) ) {
177177 this . component . warn ( this , compiler_warnings . a11y_label_has_associated_control ) ;
178178 }
179179 }
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ const a11y_labelable = new Set([
174174 'textarea'
175175] ) ;
176176
177- export function may_contain_input_child (
177+ export function contains_input_child (
178178 root : INode ,
179179 rule_options : CompileOptions [ 'a11y' ] [ 'rules' ] [ 'label-has-associated-control' ]
180180) : boolean {
You can’t perform that action at this time.
0 commit comments