-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Adjust files favorite marker to fulfill A11Y contrast requirements #38370
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
| white: 'fff', | ||
| yellow: 'FC0', | ||
| // gold but for backwards compatibility called yellow | ||
| yellow: 'a08b00', |
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.
For me the contrast to the normal file icons is not getting too low. I can barely see it.
Also not sure if we need 3:1 by default (AA) or only in high contrast (AAA)
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 about 2 different things right?
- The action in the drop down (always against white/dark background, can simply use the color of all other action icons)
- The icon on top of the filetype icon or worse thumbnail in the files list.
I'm not sure we can find a matching color for that that won't fail with any file type icon.
So maybe we need to add a border on the icon like shown here:
https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html#figure-two-star-ratings
Or we have to do something else, since the icon is now basically invisible:

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.
Yes I tried to find a matching color, but I do not think one exist. Because the color of the default filetype icons (gray), primary color for folders (blue) and background color (white) do not allow any yellowish color with enough contrast.
The current "gold" color does only work for white and black (and some slight gray like the hover colors).
Thats why I now think adding a "border" around the favorite marker is the only working solution as it makes the color independent from the filetype and preview images.
icon-starred-yellow to fulfill A11Y contrast requirements4f6d4dc to
24d2bd8
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.
Seems good, some questions / feedback:
- I’d say it’s better to keep the star in the top right, as bottom right is where the status is usually on avatars. Having it on the top right makes it very clear it’s a filename with a star vs an avatar with a status.
- The star has a circle around it which looks a bit off. Can it just be a star-shaped thick transparent gap?
- Is the contrast 3:1 not about text elements? Graphic elements have different contrast requirements?
I chose the lower right over the top, because the filetype icons have spacial outline on the right top (e.g. the "corner").
I can create a mockup for this.
3:1 is for text AA level and graphic elements, for text AAA level 4.5:1. Especially if we want BITV we need 3:1 for graphical elements. |
|
From my POV the "gold" is so far off from being a shiny yellow start, that we could also just make it black. It's not attention driving anymore anyway. |
@nickvergessen @jancborchardt (My personal preference of those would be the primary star with round background) But there is an other option which I kind of like: Removing the star from the thumbnail and move the "favorite" action from the files actions to be always the first action. This way the favorite marker is also a usable action: |
|
@susnux thanks! :) The first proposal looks by far best. The border around it should just be a bit rounded so it’s not so spiky. And yes, it needs to be in the top right, as in the bottom right we have the status, and as @nickvergessen said the star is also used for Talk conversations which can have the status icon in the bottom right for 1on1 conversations. |
|
@jancborchardt is this enough roundness? If yes then it would look like this:
|
|
I'd still heavily prefer the "Black outline with yellow star for more contrast" instead of that no color brown replacement making it not stand out anymore |
24d2bd8 to
ae789e3
Compare
jancborchardt
left a comment
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.
@susnux could be a bit more rounded off but looks good! :)
@nickvergessen the issue with the black border yellow filled is that it looks super close to just an empty black border star, which is what usually denotes non-favoriting.
This comment was marked as outdated.
This comment was marked as outdated.
|
@susnux thanks! The inward parts were actually ok (now weirdly too rounded), it was mostly the tips which were too pointy. :) |
d9d2c2f to
a184bb5
Compare
|
@jancborchardt Ok 😃 without rounding the inner corners it looks like this: |
a184bb5 to
61712ad
Compare
jancborchardt
left a comment
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! :)
09818e4 to
8ea74bc
Compare
Thank you! Rebased and squashed the commits, ready for reviews 😃 |
8ea74bc to
6ebf160
Compare
…equirements Signed-off-by: Ferdinand Thiessen <[email protected]>
…irements are met Signed-off-by: Ferdinand Thiessen <[email protected]>
6ebf160 to
35da64a
Compare











Summary
Follow up on #38333
The current star color (yellow) does not work for accessibility as the contrast is too low on the default background color, we need at least a contrast of 3:1 but it only had 1.5:1. So the first part of this PR adjusts the star color to "gold" which works with
--color-main-backgroundon dark and bright color themes as well as with the hover background colors.The second parts adjusts the favorite marker it self, as there are too many possible colors (folders = primary color, default icon = gray, preview images = random colors) the favorite marker is now placed with a slim border of 2px (circle) to get a consistent background for contrast (similar to the online status on avatar).
Screenshots
Second version of the PR:
Details
Fist version of the PR:
Details
The current color does not work on the default bright color theme as it does not provide a contrast of at least 3:1.
Screenshots
Checklist