@@ -32,6 +32,10 @@ module Accessibility
3232 per_component : {
3333 Primer ::Alpha ::ToggleSwitch => {
3434 all_scenarios : %i[ button-name ]
35+ } ,
36+
37+ Primer ::Alpha ::MultiInput => {
38+ visually_hide_label : %i[ label-title-only ]
3539 }
3640 }
3741 }
@@ -46,6 +50,8 @@ def ignore_preview?(preview_class)
4650 end
4751
4852 def axe_rules_to_skip ( component : nil , scenario_name : nil , flatten : false )
53+ scenario_key = scenario_name . is_a? ( String ) ? scenario_name . to_sym : scenario_name
54+
4955 to_skip = {
5056 wont_fix : Set . new ( AXE_RULES_TO_SKIP . dig ( :wont_fix , :global ) || [ ] ) ,
5157 will_fix : Set . new ( AXE_RULES_TO_SKIP . dig ( :will_fix , :global ) || [ ] )
@@ -55,9 +61,9 @@ def axe_rules_to_skip(component: nil, scenario_name: nil, flatten: false)
5561 to_skip [ :wont_fix ] . merge ( AXE_RULES_TO_SKIP . dig ( :wont_fix , :per_component , component , :all_scenarios ) || [ ] )
5662 to_skip [ :will_fix ] . merge ( AXE_RULES_TO_SKIP . dig ( :will_fix , :per_component , component , :all_scenarios ) || [ ] )
5763
58- if scenario_name
59- to_skip [ :wont_fix ] . merge ( AXE_RULES_TO_SKIP . dig ( :wont_fix , :per_component , component , scenario_name ) || [ ] )
60- to_skip [ :will_fix ] . merge ( AXE_RULES_TO_SKIP . dig ( :will_fix , :per_component , component , scenario_name ) || [ ] )
64+ if scenario_key
65+ to_skip [ :wont_fix ] . merge ( AXE_RULES_TO_SKIP . dig ( :wont_fix , :per_component , component , scenario_key ) || [ ] )
66+ to_skip [ :will_fix ] . merge ( AXE_RULES_TO_SKIP . dig ( :will_fix , :per_component , component , scenario_key ) || [ ] )
6167 end
6268 end
6369
0 commit comments