-
-
Couldn't load subscription status.
- Fork 800
Add visually-hidden class #6356
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
Conversation
✅ Deploy Preview for plone-components canceled.
|
|
@JeffersonBledsoe @ichim-david if we do this, we need that also in |
|
@JeffersonBledsoe it seems you pushed more changes than the needed in this PR. Can you take a look, please? you deleted things and files, that we cannot remove. |
a21a81b to
9da45c9
Compare
|
@sneridagh @JeffersonBledsoe I've taken a deeper look and it seems that bootstrap 5 renamed sr-only to visually-hidden. This is such a standard nowadays that I doubt that it could lead to class conflicts on account of modifying such class. |
|
@plone/volto-accessibility I'll try to run some tests within our theme to see if I can find any conflicts. |
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.
I think this is fine from my point of view, waiting also for @Wagner3UB review if there would be any conflict with the bootstrap theme
|
All good here for me. |
|
@JeffersonBledsoe @ichim-david Can we merge this one? |
|
@Wagner3UB I still need to add this to |
|
Hi There! 👋 We haven't seen any activity on this pull request in a while 😴, and we want to make sure that it's still relevant. Please let us know by:
Otherwise close this pull request. 🧹 |
|
@JeffersonBledsoe @ichim-david what about this? Is it ready to merge? we need this fixes.. |
@pnicolli @Wagner3UB I find it strange that this is considered a breaking change. Is this because the class name |
I guess yes, this a11y change would silently changes behavior of any custom class with the same name. I see it as a behaviour change not a developer error. |
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.
Maybe we can add some code examples in the upgrade guide to show the exact class name. Otherwise lgtm as well.
Co-authored-by: Steve Piercy <[email protected]>
Co-authored-by: Steve Piercy <[email protected]>
@wesleybl @JeffersonBledsoe @pnicolli This can be discussed, but it creates room for duplicate classes to remain in the code. I’m not sure if that would be acceptable. If it is, we can certainly create a specific class to reference this kind of behavior. Keep in mind that there are other older classes from different libraries that might have been included, such as sr-only, an old class from Bootstrap 4. |
@nileshgulia1 Sure, add info is never a problem! |
@wesleybl I personally usually consider anything that could change the end user website appearance as a breaking change. Adding a global css class with a name that is commonly already used elsewhere, even if it usually has the same goal, can fall into these breaking change category. Again, this is just my personal opinion, and I understand it might look a little too strict. @sneridagh you got any opinion about this matter?
I am not sure, Plone used to have these "branded" classes in Plone 5 and I found them confusing eventually. I would not be 100% against it but hoestly I would just put the class in your custom projects when you need it if those are Volto 18 still, it's a super quick addition. |
|
@pnicolli @wesleybl luckily we have this written down: https://6.docs.plone.org/volto/release-management-notes/index.html#dom-structure-and-default-styling Yes, it is a breaking change and should be documented as one properly. Also, this makes it non-backportable to 18. As @pnicolli said, a quick addition to any 18 project. Regarding the |
Co-authored-by: Steve Piercy <[email protected]>
|
@JeffersonBledsoe I think we are done here! @pnicolli @stevepiercy We have your blessing? |
|
I'm so sorry to bring up more problems, but I realized that we are adding this to Also since this is a breaking change, we cannot backport it to Volto 18. |
@pnicolli @sneridagh @Wagner3UB What I'm trying to say is this: We have an accessibility issue in both Volto 19 and Volto 18. If the fix in Volto 19 is a breaking change, fine. But we need to find a way to make it work in Volto 18 as well. Volto 18 is the current version of Volto. We need to fix accessibility issues in it. This is a bug. We can't just say "fix it in your project." |
Just want to make sure here that I explain my thoughts in a clear way: we are only talking about adding the If you are thinking about the bugfix in #7500 then yes, I agree we should have a fix for that in Volto 18 as well. That PR is out of scope here, even if it is what triggered the discussion on this PR, and thank you again for bringing this up over there. We should try to stick to our policy about breaking changes at all times unless really unavoidable. In the specific case of #7500 we should finish and merge this PR and then use the class that we are adding here to fix that issue in Volto 19. Then we should fix the issue in Volto 18, absolutely, but I would simply change the fix to make it non-breaking. For example, for Volto 18, we should not use this class and instead apply these styles directly to the affected item. I would say let's continue the discussion about that other PR in its specific thread and not here, otherwise we risk mixing things up too much. Am i making sense here? Always happy to discuss! |
|
@pnicolli you are right, let's remove the addition to |
|
@pnicolli Ok, completely understood. Thank you. |
|
@pnicolli @sneridagh Done, I have removed the plone/components part. Now we are good to go. |
This PR adds a
visually-hiddenclass which is useful in situations where you want to provide additional information to Assistive Technology and an aria-label may not be appropriate.Questions
Todo
@plone/components