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(controls): improve focus style to meet WCAG 2.2 AA #267

Merged
merged 5 commits into from
Feb 7, 2024

Conversation

dancormier
Copy link
Contributor

@dancormier dancormier commented Jan 31, 2024

Closes STACKS-542

This PR updates focus styles for buttons that are editor controls.

Note
This PR removes styling for .s-btn-group__radio. This element no longer exists (it's now .s-btn-group--radio).

Note
This output of this PR may look incorrect until the @StackExchange/stacks dependency is updated beyond 2.0.9.

Copy link

netlify bot commented Jan 31, 2024

Deploy Preview for stacks-editor ready!

Name Link
🔨 Latest commit b5634a9
🔍 Latest deploy log https://app.netlify.com/sites/stacks-editor/deploys/65c3bc23148cfd00082d82f3
😎 Deploy Preview https://deploy-preview-267--stacks-editor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@giamir
Copy link
Contributor

giamir commented Feb 7, 2024

@dancormier What do you think of adding @stackoverflow/stacks in the peerDependencies field of the package.json of this library?

"peerDependencies": {
    "@stackoverflow/stacks": "~2.1.0",
    "highlight.js": "^11.6.0"
}

This reference will then be moved to the devDependencies object the same way we do for highlight.js.

I am suggesting this because the release containing the changes on this PR (probably v0.10.0) will rely on the styles of Stacks Classic v2.1.0 or above being rendered alongside the editor. Consumers failing to do so will potentially get a half broken editor. I also think that dependabot (for example in Core) will be smart enough and attempt to bump both libraries at once (worst case it will correctly fail CI when trying to run npm i updating exclusively the editor).

@giamir
Copy link
Contributor

giamir commented Feb 7, 2024

@dancormier What do you think of adding @stackoverflow/stacks in the peerDependencies field of the package.json of this library?

I took the liberty to cut a stacks classic release candidate and also add 2.1.0 as peer deps in this PR.
I hope that's ok.

4af3721

…sometimes there a small breaking changes in minor releases)
Copy link
Contributor

@giamir giamir left a comment

Choose a reason for hiding this comment

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

Work as advertised. Great work @dancormier

I am approving but let's remember we need to change stacks classic dep to 2.1.0 before merging and then cut the release.

src/styles/custom-components.css Show resolved Hide resolved
@dancormier dancormier marked this pull request as ready for review February 7, 2024 17:25
@dancormier dancormier merged commit 7cbaf5e into main Feb 7, 2024
4 checks passed
@dancormier dancormier deleted the STACKS-542/focus-styles-editor-controls branch February 7, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants