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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove collapsed side panel from accessibility tree #4628

Merged

Conversation

petermakowski
Copy link
Contributor

@petermakowski petermakowski commented Jan 17, 2023

Done

  • fix: remove collapsed side panel from accessibility tree
    • set .l-aside .is-collapsed visibility to hidden

Fixes: #4629

QA

  • Open demo
  • Verify that collapsed side panel contents are hidden for accessibility APIs (you can check that in Chrome devtools accessibility tab and verify that the elements are ignored)

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 馃巵, Breaking Change 馃挘, Bug 馃悰, Documentation 馃摑, Maintenance 馃敤.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.
  • Documentation side navigation should be updated with the relevant labels.

Screenshots

[if relevant, include a screenshot or screen capture]

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4628.demos.haus

@@ -235,7 +235,7 @@ $application-layout--side-nav-width-expanded: 15rem !default;
}

.l-aside {
@include vf-transition($property: #{transform, box-shadow}, $duration: snap);
@include vf-transition($property: #{transform, box-shadow, visibility}, $duration: snap);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is visibility a prop that can be transitioned?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Try the demo with visibility transition and without to see for yourself 馃槃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@bartaz bartaz Jan 17, 2023

Choose a reason for hiding this comment

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

Cool! That simplifies a lot of things.

Based on the description it seems it "should" switch to visibility: hidden as soon as animated value is closer to 0 (so less than 0.5?) which would mean it disapears mid-transition. This doesn't seem to happen (which is good).

image

Anyway, thanks for the fix! We need to look if there are any other places that would benefit from that. I recall us implementing some workarounds for similar issues in side navigation.

@petermakowski petermakowski changed the title fix: hide collapsed side panel for accessibility APIs fix: remove collapsed side panel from accessibility tree Jan 17, 2023
@bartaz
Copy link
Contributor

bartaz commented Jan 17, 2023

@petermakowski Could you bump version in package.json to 3.10.1? Thanks!

Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Just bump the patch version in package.json and it's good to merge, thanks!

@bartaz bartaz merged commit 995d026 into canonical:main Jan 18, 2023
@petermakowski petermakowski deleted the fix-l-aside-collapsed-visibility-hidden branch January 18, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.l-aside when collapsed is visible via accessibility APIs
4 participants