Skip to content

High contrast: Multiple component support for mouse over states#4728

Merged
lynamemi merged 26 commits intomicrosoft:masterfrom
lynamemi:hc-focus
May 4, 2018
Merged

High contrast: Multiple component support for mouse over states#4728
lynamemi merged 26 commits intomicrosoft:masterfrom
lynamemi:hc-focus

Conversation

@lynamemi
Copy link
Copy Markdown
Collaborator

@lynamemi lynamemi commented May 1, 2018

Pull request checklist

Description of changes

I grouped some of the simpler component states from the issue:

Breadcrumb:
breadcrumb-hover-hc

Button (made this general change across many buttons):
button-hover-hc

Link:
link-hover-hc

Pivot:
pivot-hover-hc

SearchBox:
searchbox-hover-hc

SpinButton:
spinbutton-hover-hc

Focus areas to test

(optional)

@cliffkoh
Copy link
Copy Markdown
Contributor

cliffkoh commented May 2, 2018

Just adding a note that command bar has been promoted from experiments to component in 6.0 (presently in the new_6.0 branch). Command bar specific changes will need to be manually applied in that branch to not be "lost" with 6.0.

@lynamemi
Copy link
Copy Markdown
Collaborator Author

lynamemi commented May 2, 2018

@cliffkoh Is that something you want me to do or are you doing a sweep of those updates?

@cliffkoh
Copy link
Copy Markdown
Contributor

cliffkoh commented May 2, 2018

Could you split the command bar changes out from this PR and create a separate PR for the command bar in new_6.0? Fortunately, the change looks simple to port. Amongst other things (such as 6.0 specific features/changes do not keep getting delayed further and further back due to a ceaseless stream of port-work), this will allow the commit moving forward to be correctly attributed to you :)

Thank you!

Copy link
Copy Markdown
Member

@betrue-final-final betrue-final-final left a comment

Choose a reason for hiding this comment

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

Just reviewed with Emily. Looks good!

color: semanticColors.linkHovered,
selectors: {
[HighContrastSelector]: {
textDecoration: 'underline'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you change this to border-bottom instead?

The reason is, I think for places where we're adding borders, we should just change it to be transparent borders and remove the high contrast selector. That way, it doesn't interfere with the default UX, while at the same time it'll actually be visible in high contrast mode in FireFox.

@betrue-final-final thoughts?

[HighContrastSelector]: {
borderColor: 'Highlight'
borderColor: 'Highlight',
outline: 'none'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why not keep using outline here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The outline was creating a lot of noise, and Ben wanted it gone. See this screenshot:
image

phkuo
phkuo previously requested changes May 2, 2018
Copy link
Copy Markdown
Contributor

@phkuo phkuo left a comment

Choose a reason for hiding this comment

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

This is great! But I just want to have the discussion on borders for supporting FF before we continue. We did commit to supporting FireFox when reasonable, but high contrast selectors only work in IE.

@lynamemi
Copy link
Copy Markdown
Collaborator Author

lynamemi commented May 2, 2018

@cliffkoh do you want me to remove the CommandBarButton change from this PR in addition to creating this new one (#4738)? Wasn't sure which approach would create the least merge conflicts!

@cliffkoh
Copy link
Copy Markdown
Contributor

cliffkoh commented May 2, 2018

Removing from here would result in the least merge conflict :)

@cliffkoh
Copy link
Copy Markdown
Contributor

cliffkoh commented May 2, 2018

Thank you 👏

Copy link
Copy Markdown
Contributor

@cliffkoh cliffkoh left a comment

Choose a reason for hiding this comment

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

Approved based on the very specific/limited set of things I was looking at 😄

@@ -0,0 +1,11 @@
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is no longer the need for this change file.

@include high-contrast {
&::before {
box-sizing: border-box;
border-bottom: 2px solid Highlight;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

set this to be a permanent hover style outside of @include high-contrast, and then change the color for just IE

@lynamemi lynamemi requested a review from dzearing as a code owner May 3, 2018 22:36
@lynamemi lynamemi merged commit 7a6b18c into microsoft:master May 4, 2018
@lynamemi lynamemi deleted the hc-focus branch May 4, 2018 16:04
JasonGore pushed a commit to natalieethell/office-ui-fabric-react that referenced this pull request May 12, 2018
dzearing pushed a commit that referenced this pull request May 14, 2018
* pass through className

* pass className through to CommandButton as well

* change request file

* use getNativeProps

* get rid of unnecessary newline

* added Pivot snapshot test for custom className

* remove space

* Update snapshots due to merge of #4728.

* Update pivotOverrideStyles_2018-04-03-18-42.json
@natalieethell natalieethell mentioned this pull request Oct 24, 2018
3 tasks
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Components need to support mouse hover in high contrast

5 participants