diff --git a/.changeset/dry-planes-fry.md b/.changeset/dry-planes-fry.md new file mode 100644 index 0000000000..41ec25b475 --- /dev/null +++ b/.changeset/dry-planes-fry.md @@ -0,0 +1,5 @@ +--- +'@commercetools-frontend/application-components': patch +--- + +Accessibility improvements of the `TabHeader` component. diff --git a/packages/application-components/src/components/tab-header/tab-header.tsx b/packages/application-components/src/components/tab-header/tab-header.tsx index 4d1d64bc1a..85a826aeea 100644 --- a/packages/application-components/src/components/tab-header/tab-header.tsx +++ b/packages/application-components/src/components/tab-header/tab-header.tsx @@ -19,10 +19,6 @@ const warnIfMissingContent = (props: TTabHeaderProps) => { ); }; -const getDisabledTabHeaderAriaAttributes = ( - isDisabled: TTabHeaderProps['isDisabled'] -) => (isDisabled ? { 'aria-disabled': true } : {}); - const getDisabledLinkAtributes = (isDisabled: TTabHeaderProps['isDisabled']) => isDisabled ? { tabIndex: -1, 'aria-disabled': true } : {}; @@ -84,20 +80,16 @@ export const TabHeader = (props: TTabHeaderProps) => { return ( -
- - {label} - -
+ + {label} + ); }; diff --git a/packages/application-components/src/components/tab-header/tab.styles.ts b/packages/application-components/src/components/tab-header/tab.styles.ts index 324eb5d2c0..2af12417e9 100644 --- a/packages/application-components/src/components/tab-header/tab.styles.ts +++ b/packages/application-components/src/components/tab-header/tab.styles.ts @@ -42,7 +42,7 @@ export const getLinkStyles = ( isActive && css` ${getBottomBorderStyles(customProperties.colorPrimary)} - > * > * { + & h4 { color: ${customProperties.colorPrimary} !important; } `, @@ -63,7 +63,7 @@ export const getLinkStyles = ( :hover, :focus, :active { - > * > * { + & h4 { color: ${customProperties.colorPrimary} !important; } }