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(many): border colors are adjusted to meet a11y contrast standards #1743

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ToMESSKa
Copy link
Contributor

@ToMESSKa ToMESSKa commented Oct 18, 2024

Closes: INSTUI-4319

TEST PLAN:

@ToMESSKa ToMESSKa self-assigned this Oct 18, 2024
background: componentTheme.toggleBackground,
boxShadow: componentTheme.toggleShadow,
borderRadius: '100%'
borderRadius: '100%',
border: componentTheme.borderWidth + ' solid',
Copy link
Contributor

Choose a reason for hiding this comment

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

you can write this a bit simpler:

const { borderWidth, uncheckedIconBorderColor, checkedIconBorderColor} = componentTheme
...
border: `${borderWidth} solid ${checked ? 'checkedIconBorderColor' : 'uncheckedIconBorderColor'}`,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rewrote that part

@@ -1377,6 +1377,10 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
getDisabledOptionProps
}) => (
<View
themeOverride={{
Copy link
Contributor

Choose a reason for hiding this comment

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

we shouldn't use themeOverride for our own components

@@ -1418,6 +1422,9 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
})}
>
<View
themeOverride={{
Copy link
Contributor

Choose a reason for hiding this comment

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

we shouldn't use themeOverride for our own components

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think according to our last discussion with Topi, we haven't made a conclusion that themeOverride should be used or not

return (
<ContextView
{...viewProps}
themeOverride={{
Copy link
Contributor

Choose a reason for hiding this comment

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

we shouldn't use themeOverride for our own components

return (
<View
{...viewProps}
themeOverride={{ borderColorPrimary: styles?.borderColor }}
Copy link
Contributor

Choose a reason for hiding this comment

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

we shouldn't use themeOverride for our own components

@@ -162,6 +174,7 @@ class ToggleGroup extends Component<ToggleGroupProps> {
display="block"
borderRadius="medium"
background="primary"
themeOverride={{ borderColorPrimary: styles?.borderColor }}
Copy link
Contributor

Choose a reason for hiding this comment

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

we shouldn't use themeOverride for our own components

@ToMESSKa ToMESSKa force-pushed the INSTUI-4319_fix_border_contrast_a_11_y_issues branch from cf7f0c8 to b560405 Compare October 21, 2024 14:00
Copy link

PR Preview Action v1.4.8
🚀 Deployed preview to https://instructure.github.io/instructure-ui/pr-preview/pr-1743/
on branch gh-pages at 2024-10-21 14:06 UTC

@ToMESSKa ToMESSKa requested a review from balzss October 30, 2024 08:46
@matyasf
Copy link
Collaborator

matyasf commented Oct 30, 2024

Can you please check where the old (low contrast) border color is used (where its not overridden by this PR)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants