Skip to content

Commit

Permalink
Fix/form caption accessibility (#893)
Browse files Browse the repository at this point in the history
* fix(ui-library): removing aria-label from form caption group

---------

Co-authored-by: christian.b.hoffmann <[email protected]>
  • Loading branch information
davidken91 and ChristianHoffmannS2 authored Feb 9, 2024
1 parent bd60858 commit 0bf08c0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const hintCaption = BlrFormCaptionRenderFunction({
icon: 'blrInfo',
size: 'md',
theme: 'Light',
arialabel: 'Form Hint',
});

const errorCaption = BlrFormCaptionRenderFunction({
Expand All @@ -27,7 +26,6 @@ const errorCaption = BlrFormCaptionRenderFunction({
icon: 'blrInfo',
size: 'md',
theme: 'Light',
arialabel: 'Form Error',
});

const mixedCaptions = html` ${hintCaption} ${errorCaption} `;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ export default {
category: 'Content / Setting',
},
},
arialabel: {
options: [undefined, ...PureIconKeys],
description:
'Provides additional information about the elements purpose and functionality to assistive technologies, such as screen readers.',
table: {
category: 'Accessibility',
},
},
},
parameters: {
design: {
Expand Down Expand Up @@ -97,7 +89,6 @@ BlrFormCaption.storyName = 'Form Caption';
const args: BlrFormCaptionType = {
theme: 'Light',
message: 'Message-text',
arialabel: 'Hint',
icon: 'blr360',
variant: 'hint',
size: 'sm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export class BlrFormCaption extends LitElement {
static styles = [];

@property() message?: string;
@property() arialabel?: string;
@property() icon?: SizelessIconType;
@property() variant: CaptionVariantType = 'hint';
@property() size?: FormSizesType = 'md';
Expand Down Expand Up @@ -50,7 +49,7 @@ export class BlrFormCaption extends LitElement {
<style>
${dynamicStyles}
</style>
<div class=${classes} aria-label=${this.arialabel || nothing}>
<div class=${classes}>
${this.icon
? BlrIconRenderFunction(
{
Expand Down

0 comments on commit 0bf08c0

Please sign in to comment.