Skip to content

.pr_agent_accepted_suggestions

root edited this page Jul 9, 2025 · 1 revision
                     PR 2950 (2025-06-25)                    
[general] Remove conflicting accessibility attributes

✅ Remove conflicting accessibility attributes

Setting aria-hidden to true while also providing ariaLabel creates conflicting accessibility signals. Remove aria-hidden since these buttons need to be accessible to screen readers for proper spinbutton functionality.

packages/core/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.tsx [25-46]

 <IconButton
-  aria-hidden
   ariaLabel="Increase"
   hideTooltip
   ariaControls={inputId}
   tabIndex={-1}
   onClick={onIncrement}
   disabled={disabled || isAtMax}
   size={iconButtonSize}
   icon={DropdownChevronUp}
 />
 <IconButton
-  aria-hidden
   ariaLabel="Decrease"
   hideTooltip
   ariaControls={inputId}
   tabIndex={-1}
   onClick={onDecrement}
   disabled={disabled || isAtMin}
   size={iconButtonSize}
   icon={DropdownChevronDown}
 />

Suggestion importance[1-10]: 9

__

Why: This suggestion correctly identifies a critical accessibility issue. Using aria-hidden on the increment and decrement buttons makes them completely inaccessible to screen readers, which contradicts the presence of ariaLabel. Removing aria-hidden is essential for the component to be usable by people relying on assistive technologies.



Clone this wiki locally