-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: filter block a11y #980
Conversation
Playwright Test Component is ready. |
Preview is ready. |
src/sub-blocks/Content/Content.tsx
Outdated
@@ -67,10 +68,11 @@ const Content = (props: ContentProps) => { | |||
title={titleProps} | |||
colSizes={{all: 12}} | |||
id={titleId} | |||
{...a11yProps?.title} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need a11yProps
if we have static role for element ?title always title, list always list and e.t.c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this specific case its here to give Title
role="link"
@@ -37,7 +33,7 @@ const BasicCard = (props: BasicCardProps) => { | |||
className={b()} | |||
contentClassName={b('content')} | |||
{...cardParams} | |||
extraProps={{'aria-describedby': descriptionId, 'aria-labelledby': titleId}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to remove descriptions? we had lost the labels and desciptions from link cards
@@ -37,7 +33,7 @@ const BasicCard = (props: BasicCardProps) => { | |||
className={b()} | |||
contentClassName={b('content')} | |||
{...cardParams} | |||
extraProps={{'aria-describedby': descriptionId, 'aria-labelledby': titleId}} | |||
extraProps={{role: 'group'}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the card (especially card with url) should have group
role? If one needs the group
role specified, then it should be possible to specify it via props, e.g. via extraProps
.
additionalInfo={additionalInfo} | ||
links={links} | ||
list={list} | ||
buttons={buttons} | ||
size="s" | ||
colSizes={{all: 12, md: 12}} | ||
controlPosition={areControlsInFooter ? 'bottom' : 'default'} | ||
a11yProps={{ | ||
title: {role: 'link', tabIndex: 0}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want link
role, it is better to use <a>
tag: no need to specify the role
and tabIndex
. But be aware of layout change due to browser default styles
To address the comments:
|
f4bfe65
to
547d02b
Compare
Removed changes related to cards as they are a separate issue now #998 |
No description provided.