-
Notifications
You must be signed in to change notification settings - Fork 90
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 tabs appearance #4815
Fix tabs appearance #4815
Conversation
Signed-off-by: Marco <[email protected]>
5afe437
to
a72bddd
Compare
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.
Looks good design-wise, any detail fixes can be done later or next release.
So do we want to go back with the design? This was basically the reason we needed to go with a new major release. |
Why do we go back now? The design feedback in nextcloud/server#41450 does not say anything about this, just mentions a small fix. |
:deep(.checkbox-radio-switch--button-variant.checkbox-radio-switch) { | ||
border: unset; | ||
// Override checkbox-radio-switch styles so that it looks like tabs | ||
:deep(.checkbox-radio-switch--button-variant) { |
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.
This completely changes the UI of the component, should we instead change that component?
Because this is now very likely to break on slight changes of the internals of NcCheckboxRadioSwitch.
For the same reason I feel quite uncomfortable with that the many !important
statements.
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.
Could we first learn what the intended goal is here? Do we intend to go back with the design completely? Is it just about small fixes?
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.
There has been a last minute request to revert this, sorry. It's a last minute fix that concerns only the sidebar tabs, hence the deep and important. It's temporary, not permanent. We can discuss what to do with checkboxradioswitch later on.
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.
That said, I think we're trying to do way too many things with NcCheckboxRadioSwitch
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.
@marcoambrosini can you make sure it doesn’t break in these 2 places:
- Sharing flow where we use the component vertically (right?)
- Forms on top right, where we use it for View/Edit/Results
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.
Could we first learn what the intended goal is here? Do we intend to go back with the design completely? Is it just about small fixes?
@raimund-schluessler Yes to both: It is about small fixes, and the active tab being way too present has been identified as a visual issue. Going to a middle ground between the old and new one seems a good way to go.
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.
Are we sure this won't cause a11y issues? Cc @JuliaKirschenheuter
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.
Are we sure this won't cause a11y issues? Cc @JuliaKirschenheuter
It only changes styles, so the only possible a11y issues could be about state styles and contrast. With the contrast everything is fine.
But with states it is not.
The current tab should have hover and active state styles.
Before | After |
---|---|
@raimund-schluessler the concrete issue is that it’s much too present and makes everything more busy. The "primary" style is ok for the primary action buttons, and it’s also good for the left navigation, but also having this in the right sidebar makes it a bit much. It’s a classic case of "if everything is important, nothing is". :) Does that explain it? |
Thanks for the explanation. I just wonder whether adjusting the color would be enough then, instead of going back to the old design and potentially breaking quite some things. E.g. one could use a similar style to a secondary button: |
This was an intermediate solution, but did not work correctly: |
@raimund-schluessler as @nickvergessen mentioned this was actually not accessible, reason being that there was too little contrast between an active entry and a non-active entry. They were not distinguishable. The bar below on this design achieves that. |
Hm, I guess we are stuck with the old, and now inconsistent, design then, since no one has a better solution 😕 |
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.
As was mentioned in the old PR (#3945 (comment)), from the design perspective, I'd prefer to go with this PR's design. IMO, the radio button switch doesn't look like a tab but presents a tab. I also agree with @susnux that it should not be implemented by deep override of the radio switch. However, I think we can merge it to have the new design soon, and fix the implementation later. |
@ShGKme since Marco is probably already out of office since he is on Japan time, could I ask you to add a hover style there which fits accessibility requirements? |
Asked @JuliaKirschenheuter to check as she also worked on this problem with the previous tabs state styles. |
Effects from the link:
|
@jancborchardt could we create same styles for our Tabs? |
@ShGKme @JuliaKirschenheuter I have doubts about the need of this outline for the active state, let alone any hover effects. We've been told before that no hover effects are ever necessary for accessibility. |
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.
@ShGKme @JuliaKirschenheuter I have doubts about the need of this outline for the active state, let alone any hover effects. We've been told before that no hover effects are ever necessary for accessibility. The link you posted contains one accessible solution, not the only accessible solution.
Without active
state, it is not visible if this component is under keyboard navigation right now or not.
For example, I see this state:
If I press Right, will I move to another tab or not? It is unknown because the user doesn't know if the tab button is active or not.
Probably I need to click on the element first. But there is also no hover effect to show that it is clickable (not about a11y).
But let's merge and discuss/fix changes later to have this earlier before the release.
Agree! But our light gray color like on hover won't help at all. If this is a requirement then it have to be solved differently. I can't find requirements regarding active styles here https://www.w3.org/WAI/ARIA/apg/patterns/tabs/. And would say we can merge it like it is for now. |
☑️ Resolves
🖼️ Screenshots
🚧 Tasks
🏁 Checklist