Skip to content
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(material-experimental/button): high contrast outline for solitary icon-buttons #22987

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

jelbourn
Copy link
Member

The high-contrast style for all buttons was previously defined in
button.scss, but icon-buttons load icon-button.scss. This means that
the high contrast style for icon buttons was only loaded when another
type of button was on the page. This change moved the icon-button high-contrast
style to icon-button.scss.

cc @zarend @amysorto FYI

@jelbourn jelbourn added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent Accessibility This issue is related to accessibility (a11y) area: material/button labels Jun 15, 2021
@jelbourn jelbourn requested a review from crisbeto June 15, 2021 20:32
@jelbourn jelbourn requested a review from andrewseguin as a code owner June 15, 2021 20:32
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 15, 2021
@@ -26,4 +27,8 @@
opacity: 1;
}
}

@include a11y.high-contrast(active, off) {
Copy link
Member

@crisbeto crisbeto Jun 15, 2021

Choose a reason for hiding this comment

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

The non-icon button also increases the outline to 3px on focus. Should we have the same here? It might be a good idea to pull these styles into _button-base.scss so they can be reused.

Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the PR to move the HC styles into their own file that's imported by both button and icon-button (but not fab)

@jelbourn jelbourn force-pushed the icon-high-contrast branch from fa3b2c5 to a06de2c Compare June 16, 2021 00:19
@jelbourn jelbourn force-pushed the icon-high-contrast branch 3 times, most recently from 66b17b7 to 3481f7f Compare June 21, 2021 20:20
@jelbourn jelbourn force-pushed the icon-high-contrast branch from 3481f7f to 7bac83a Compare July 2, 2021 20:53
@jelbourn
Copy link
Member Author

jelbourn commented Jul 2, 2021

@crisbeto PTAL at the updated changes

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jul 2, 2021
@jelbourn jelbourn removed the action: merge The PR is ready for merge by the caretaker label Jul 2, 2021
…tary

icon-buttons

The high-contrast style for all buttons was previously defined in
`button.scss`, but icon-buttons load `icon-button.scss`. This means that
the high contrast style for icon buttons was only loaded when another
type of button was on the page. This change moves the high-contrast styles to their own file that's referenced from buttons and icon-buttons (but not FABs).
@jelbourn jelbourn force-pushed the icon-high-contrast branch from 7bac83a to fb2f0da Compare July 2, 2021 21:59
@jelbourn
Copy link
Member Author

jelbourn commented Jul 2, 2021

Whoops, I accidentally pushed a stale branch somehow. Updated with the real changes

@jelbourn jelbourn added the target: patch This PR is targeted for the next patch release label Jul 7, 2021
@andrewseguin
Copy link
Contributor

@jelbourn Did you want to add the merge ready label back on

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Jul 21, 2021
@jelbourn
Copy link
Member Author

Added it back

@mmalerba mmalerba merged commit 30e9205 into angular:master Jul 23, 2021
mmalerba pushed a commit that referenced this pull request Jul 23, 2021
…tary (#22987)

icon-buttons

The high-contrast style for all buttons was previously defined in
`button.scss`, but icon-buttons load `icon-button.scss`. This means that
the high contrast style for icon buttons was only loaded when another
type of button was on the page. This change moves the high-contrast styles to their own file that's referenced from buttons and icon-buttons (but not FABs).

(cherry picked from commit 30e9205)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker area: material/button cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants