-
Notifications
You must be signed in to change notification settings - Fork 376
Closed
Labels
A11yBreaking change 💥this change requires a major release and has API changes.this change requires a major release and has API changes.
Milestone
Description
Property names for aria attributes are inconsistent. Some examples:
AboutModalContainertakes the following properties:ariaLabelledbyId,ariaDescribedById. Note inconsistencies inbyvsBy.AboutModalBoxtakes the raw HTML properties:aria-labelledby,aria-describedbyAlerttakesvariantandvariantLabeland setsaria-label=undefinedas a default property without it being an actual component property that we can typecheck.- I'm sure there's more...
Codebase names:
ariaLabel: 148aria-label: 424aria-controls: 10ariaControls: 3aria-labelledby: 74ariaLabelledbyId: 10aria-describedby: 18ariaDescribedById: 12variant: 694variantLabel: 13- There's more... See the aria property list and use a global regex tool to spot our naming inconsistencies.
We are already mostly using the HTML properties, so I propose we introduce a breaking change to rename properties like ariaLabelledbyId to their HTML counterpart aria-labelledby. If we need to do logic with them in the component, we can rename them to camel-case in the property destructuring that already takes place using the : syntax:
{
'variant-label': variantLabel,
'aria-label': ariaLabel,
'aria-labelledby': ariaLabeledBy,
'aria-describedby': ariaDescribedBy
}jschuler
Metadata
Metadata
Assignees
Labels
A11yBreaking change 💥this change requires a major release and has API changes.this change requires a major release and has API changes.