Skip to content
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: improve sd-expandable a11y #1724

Merged
merged 20 commits into from
Jan 15, 2025
Merged

Conversation

paulovareiro29
Copy link
Contributor

@paulovareiro29 paulovareiro29 commented Dec 11, 2024

Description:

Closes #1476 and #1778

This PR addresses:

  • Adjust sd-expandable spacings according to figma
  • Reorder of sd-expandable dom order. (button first so it is targetable by keyboard first)
  • Improvement of the sd-expandable template labels
  • Added accessibility hints to sd-expandable

Definition of Reviewable:

  • Documentation is created/updated
  • Migration Guide is created/updated
  • E2E tests (features, a11y, bug fixes) are created/updated
  • Stories (features, a11y) are created/updated
  • relevant tickets are linked

Copy link

changeset-bot bot commented Dec 11, 2024

🦋 Changeset detected

Latest commit: 45922d1

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 11, 2024

🚀 Storybook has been deployed for branch fix_improve-sd-expandable-a11y

@MartaPintoTeixeira
Copy link
Contributor

Accessibility hints added in storybook were now added to figma.

@paulovareiro29
Copy link
Contributor Author

Hi @MartaPintoTeixeira @coraliefeil ,
I have adjusted the spacings between the content and the button to look like figma. In figma there is a spacing of 16px. Previously, on implementation, there was none.

@paulovareiro29 paulovareiro29 changed the base branch from main to next December 13, 2024 11:07
@smfonseca smfonseca changed the base branch from next to main December 13, 2024 14:22
@paulovareiro29 paulovareiro29 changed the base branch from main to next December 18, 2024 09:04
@paulovareiro29
Copy link
Contributor Author

FYI: Talked directly with Marta and we agreed on changing the default translations to:
"Show Less" -> "Collapse to show less"
"Show More" -> "Expand to show more"

This would be the default translations and still not recommended to be used on a production environment, but still it is better.

This default translations would only be used on the default component on the docs.

@MartaPintoTeixeira
Copy link
Contributor

As spoken please remove underlines bellow the labels as in the main component.

@mariohamann
Copy link
Contributor

mariohamann commented Jan 14, 2025

Since we have an accessibility hint saying "Generic summaries like "show more" should be avoided."
Should we consider renaming the "Show more" button that opens the expandable to "Expand to read more content"?

This is in no way less generic, but just more text. The guideline aims more to avoid repeating, non-descriptive links, see e. g. https://www.visionaustralia.org/business-consulting/digital-access/blog/how-to-make-read-more-links-accessible

Expanding this to more text makes this even worse. I'm not sure, if we can do anything about this inside our components.

@MartaPintoTeixeira @paulovareiro29

@coraliefeil
Copy link
Contributor

I’ll ask Damaris. I’m having a sync with her today.

@MartaPintoTeixeira
Copy link
Contributor

Since we have an accessibility hint saying "Generic summaries like "show more" should be avoided."
Should we consider renaming the "Show more" button that opens the expandable to "Expand to read more content"?

This is in no way less generic, but just more text. The guideline aims more to avoid repeating, non-descriptive links, see e. g. https://www.visionaustralia.org/business-consulting/digital-access/blog/how-to-make-read-more-links-accessible

Expanding this to more text makes this even worse. I'm not sure, if we can do anything about this inside our components.

@MartaPintoTeixeira @paulovareiro29

Okay in that case let's reverse this changes @paulovareiro29

@MartaPintoTeixeira
Copy link
Contributor

@mariohamann

While reviewing the sd-expandable I have noticed that in the current version in storybook the label is underlined. But in figma we dont use underline for expandable.
While speaking with Vasconcelos, Aurora (EXT/Partner) (Guest) we checked that the element is an sd-interactive and as so it should not have underline as well.
I would like to check if we should keep the underline or remove it please.

Copy link
Contributor

@MartaPintoTeixeira MartaPintoTeixeira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for a question to be answered to approve PR

@MartaPintoTeixeira
Copy link
Contributor

fix: 🤔 sd-expandable label underline to be removed
#1778

bug ticket created

Copy link
Contributor

@MartaPintoTeixeira MartaPintoTeixeira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved from design side.
Bug found: fix: 🤔 sd-expandable label underline to be removed
#1778

@MartaPintoTeixeira MartaPintoTeixeira removed their assignment Jan 15, 2025
Copy link
Collaborator

@smfonseca smfonseca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything's good, just the changesets that should be split. Let me know once this is done so that we can merge this PR. Thank you

.changeset/violet-bulldogs-draw.md Show resolved Hide resolved
@paulovareiro29 paulovareiro29 merged commit c7bab9d into next Jan 15, 2025
4 checks passed
@paulovareiro29 paulovareiro29 deleted the fix/improve-sd-expandable-a11y branch January 15, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

feat[dev]: ✨ implement A11y improvements to sd-expandable
7 participants