-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[Bug]: Tree component is not built with High Contrast in mind. #33711
Comments
If you want more information on my use case, you can also reach out to me internally - aolariu. |
This comment has been minimized.
This comment has been minimized.
Thanks for the feedback @arolariu , you're right, the hovering style on forced high contrast mode is not present. I'll investigate and see what we can do about it 😁 Preferably it should have the same (or at least close enough to) the high contrast mode examples we have available when forcing the theme to be high contrast mode Problem is how to ensure buttons added in the How would that look like if it had actions with this treeitem?https://react.fluentui.dev/?path=/docs/components-tree--docs#actions |
@bsunderhus - yep, the story that you've given to me would look weird with just (ignore the text background-color, forgot to apply) The buttons should maybe have the negative color (to be in contrast with the tree item), to the tree item's background-color. What do you say? |
It seems to me that once a IMO the safest way to go about this is to use the surface style instead of the input style. |
Hmm, so in layman terms, what do you suggest is/should be the official response to the question in regards to how to use the TreeItem component in HC scenarios? |
Component
Tree
Package version
9.55.0
React version
18.2.0
Environment
Current Behavior
Hi,
Just a random question, feel free to redirect me if this has been asked before and/or this scenario is documented somewhere:
I've searched in the docs and I cannot find any reference to how this component should behave in high contrast;
The problem that I am having is regarding the
:hover
visual appearance - in high contrast it feels broken / non-existent.Example of the
:hover
state on a tree item (grabbed straight from the docs: https://react.fluentui.dev/?path=/docs/components-tree--docs#appearance):Normal mode:
High Contrast mode:
As you can see (open in separate tab for better visibility) - there is a faint
background-color
css attribute that is applied for the tree items, on hover, in normal mode.The same
background-color
is non-existent / non-visible in the high contrast mode.I was able to workaround this by doing the following css hack:
Output:
Expected Behavior
We're wondering what is the official statement from Fluent team on this component's appearance for high contrast displays - can you perhaps take a look and come up with an official response and/or solution, so that the Tree component behaves as expected, in both normal and high contrast modes?
Reproduction
https://react.fluentui.dev/?path=/docs/components-tree--docs#appearance
Steps to reproduce
:hover
css styling being applied, when you hover over a tree item.:hover
css styling not making a visual difference to the tree item.Are you reporting an Accessibility issue?
yes
Suggested severity
High - No workaround
Products/sites affected
people-app
Are you willing to submit a PR to fix?
yes
Validations
The text was updated successfully, but these errors were encountered: