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 constrast for accessibility #7315

Merged
merged 30 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5d1a61b
Closes #7304
charlesh88 Dec 18, 2023
5bc2ad6
Merge branch 'master' of https://github.com/nasa/openmct into fix-con…
unlikelyzero Dec 19, 2023
255b733
Closes #7304
charlesh88 Dec 19, 2023
4ccbf39
Merge branch 'fix-constrast' of github.com:nasa/openmct into fix-cons…
charlesh88 Dec 19, 2023
27403a0
disable ruleset
unlikelyzero Dec 20, 2023
842fccf
Closes #7304
charlesh88 Dec 20, 2023
f9ae900
Closes #7304
charlesh88 Dec 20, 2023
30289b3
Closes #7304
charlesh88 Dec 20, 2023
39f4629
Merge branch 'fix-constrast' of github.com:nasa/openmct into fix-cons…
charlesh88 Dec 20, 2023
10b859e
Closes #7304
charlesh88 Dec 20, 2023
38d0b49
Closes #7304
charlesh88 Dec 20, 2023
2886bfd
Closes #7304
charlesh88 Dec 20, 2023
eca4c19
Update ColorKey for Take Snapshot Failures and Opacity labels. Also f…
unlikelyzero Dec 21, 2023
3c5c8ed
Closes #7304
charlesh88 Jan 16, 2024
f9015fe
Merge remote-tracking branch 'origin/fix-constrast' into fix-constrast
charlesh88 Jan 16, 2024
35ab393
Merge branch 'master' into fix-constrast
charlesh88 Jan 16, 2024
6d404be
Merge branch 'master' into fix-constrast
shefalijoshi Jan 22, 2024
a2c616a
Merge branch 'master' into fix-constrast
charlesh88 Jan 23, 2024
cccab2c
Closes #7304
charlesh88 Jan 25, 2024
06847ad
Merge branch 'master' into fix-constrast
charlesh88 Jan 25, 2024
31040c7
Closes #7410
charlesh88 Jan 24, 2024
a944b46
Closes #7304
charlesh88 Jan 25, 2024
81f40d9
Merge branch 'master' into fix-constrast
unlikelyzero Jan 30, 2024
4748469
temporarily skip
unlikelyzero Jan 30, 2024
464dbdd
Merge branch 'fix-constrast' of https://github.com/nasa/openmct into …
unlikelyzero Jan 30, 2024
b63a0ee
remove comment
unlikelyzero Jan 30, 2024
1261ee7
lint
unlikelyzero Jan 30, 2024
746f841
Update default colors
unlikelyzero Jan 30, 2024
0c9a73b
update snapshot
unlikelyzero Jan 30, 2024
4d5296f
missed
unlikelyzero Jan 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/avpFixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ exports.scanForA11yViolations = async function (page, testCaseName, options = {}
const builder = new AxeBuilder({ page });
builder.withTags(['wcag2aa']);
// https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md
builder.disableRules(['color-contrast']);
//builder.disableRules(['color-contrast']);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this will eventually be deleted

const accessibilityScanResults = await builder.analyze();

// Assert that no violations should be present
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/folderView/components/grid-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

&__metadata {
color: $colorItemFgDetails;
font-size: 0.9em;
//font-size: 0.9em;

body.mobile & {
[class*='__item-count'] {
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/folderView/components/list-item.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/******************************* LIST ITEM */
.c-list-item {
color: $colorItemFgDetails;

&__name__type-icon {
color: $colorItemTreeIcon;
}
Expand All @@ -8,12 +10,12 @@
@include ellipsize();

a & {
// .c-list-item_name a element
color: $colorItemFg;
}
}

&:not(.c-list-item__name) {
color: $colorItemFgDetails;
}

&.is-alias {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/timeConductor/date-picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
}

&.selected {
background: $colorKey;
background: $colorKeyBg;
color: $colorKeyFg;
}
}
Expand Down
35 changes: 19 additions & 16 deletions src/styles/_constants-espresso.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,24 @@ $shdwBtns: rgba(black, 0.2) 0 1px 2px;
$shdwBtnsOverlay: rgba(black, 0.5) 0 1px 5px;

// Base colors
$colorBodyBg: #393939;
$colorBodyBg: #333;
$colorBodyFg: #aaaaaa;
$colorBodyFgSubtle: #9c9c9c;
$colorBodyFgEm: #fff;
$colorGenBg: #222;
$colorHeadBg: #262626;
$colorHeadBg: #000;
$colorHeadFg: $colorBodyFg;
$colorKey: #0099cc;
$colorKeyBg: #007fad; // Darker version of colorKey for use in major buttons
$colorKeyFg: #fff;
$colorKeyHov: lighten($colorKey, 10%);
$colorKeyBgHov: lighten($colorKeyBg, 10%);
$colorKeyFilter: invert(36%) sepia(76%) saturate(2514%) hue-rotate(170deg) brightness(99%)
contrast(101%);
$colorKeyFilterHov: invert(63%) sepia(88%) saturate(3029%) hue-rotate(154deg) brightness(101%)
contrast(100%);
$colorKeySelectedBg: $colorKey;
$colorKeySelectedBg: $colorKeyBg;
$colorKeySubtle: pushBack($colorKey, 10%);
$uiColor: #0093ff; // Resize bars, splitter bars, etc.
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
$colorA: #ccc;
Expand Down Expand Up @@ -142,7 +146,6 @@ $colorPausedFg: #333;
// Base variations
$colorBodyBgSubtle: pullForward($colorBodyBg, 5%);
$colorBodyBgSubtleHov: pullForward($colorBodyBg, 10%);
$colorKeySubtle: pushBack($colorKey, 10%);

// Time Colors
$colorTimeCommonFg: #eee;
Expand Down Expand Up @@ -237,8 +240,8 @@ $colorBtnFg: pullForward($colorBodyFg, 10%);
$colorBtnReverseFg: pullForward($colorBtnFg, 10%);
$colorBtnReverseBg: pullForward($colorBtnBg, 10%);
$colorBtnFgHov: $colorBtnFg;
$colorBtnMajorBg: $colorKey;
$colorBtnMajorBgHov: $colorKeyHov;
$colorBtnMajorBg: $colorKeyBg;
$colorBtnMajorBgHov: $colorKeyBgHov;
$colorBtnMajorFg: $colorKeyFg;
$colorBtnMajorFgHov: pushBack($colorBtnMajorFg, 10%);
$colorBtnCautionBg: $colorStatusAlert;
Expand All @@ -263,7 +266,7 @@ $shdwCursorGuide: rgba(black, 0.4) 0 0 2px;
$colorLocalControlOvrBg: rgba($colorBodyBg, 0.8);
$colorSelectBg: $colorBtnBg; // This must be a solid color, not a gradient, due to usage of SVG bg in selects
$colorSelectFg: $colorBtnFg;
$colorSelectArw: lighten($colorBtnBg, 20%);
$colorSelectArw: #777777; // This must be a solid color, not a gradient, due to usage of SVG bg in selects
$shdwSelect: rgba(black, 0.5) 0 0.5px 3px;
$controlDisabledOpacity: 0.2;

Expand Down Expand Up @@ -316,10 +319,10 @@ $formRowCtrlsH: 14px;
// Inspector
$colorInspectorBg: pullForward($colorBodyBg, 5%);
$colorInspectorFg: $colorBodyFg;
$colorInspectorPropName: pushBack($colorBodyFg, 20%);
$colorInspectorPropVal: pullForward($colorInspectorFg, 15%);
$colorInspectorPropName: $colorBodyFgSubtle;
$colorInspectorPropVal: $colorBodyFgEm;
$colorInspectorSectionHeaderBg: pullForward($colorInspectorBg, 5%);
$colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
$colorInspectorSectionHeaderFg: #bfbfbf;

// Tabs
$colorTabBg: pullForward($colorBodyBg, 5%);
Expand Down Expand Up @@ -366,8 +369,8 @@ $colorLimitCyanFg: #d3faff;
$colorLimitCyanIc: #6bedff;

// Events
$colorEventPurpleFg: #6433ff;
$colorEventRedFg: #cc0000;
$colorEventPurpleFg: #7d52ff;
$colorEventRedFg: #f40000;
$colorEventOrangeFg: orange;
$colorEventYellowFg: #ffcc00;

Expand All @@ -383,7 +386,7 @@ $colorItemBgHov: buttonBg(pullForward($colorBtnBg, 5%));
$colorListItemBg: transparent;
$colorListItemBgHov: rgba($colorKey, 0.1);
$colorItemFg: $colorBtnFg;
$colorItemFgDetails: pushBack($colorItemFg, 20%);
$colorItemFgDetails: $colorBodyFgSubtle;
$shdwItemText: none;

// Tabular (NOT TABS!)
Expand Down Expand Up @@ -478,9 +481,9 @@ $colorSplitterActive: $colorKey;
$splitterBtnD: (16px, 35px); // height, width
$splitterBtnColorBg: $colorBtnBg;
$splitterBtnColorFg: #999;
$splitterBtnLabelColorFg: #666;
$splitterCollapsedBtnColorBg: #222;
$splitterCollapsedBtnColorFg: #555;
$splitterBtnLabelColorFg: $colorBodyFgSubtle;
$splitterCollapsedBtnColorBg: $colorHeadBg;
$splitterCollapsedBtnColorFg: #777;
$splitterCollapsedBtnColorBgHov: $colorKey;
$splitterCollapsedBtnColorFgHov: $colorKeyFg;

Expand Down
6 changes: 4 additions & 2 deletions src/styles/_constants-maelstrom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ $colorGenBg: #222;
$colorHeadBg: #262626;
$colorHeadFg: $colorBodyFg;
$colorKey: #0099cc;
$colorKeyBg: #007fad; // Darker version of colorKey for use in major buttons
$colorKeyFg: #fff;
$colorKeyHov: #26d8ff;
$colorKeyBgHov: lighten($colorKeyBg, 10%);
$colorKeyFilter: invert(36%) sepia(76%) saturate(2514%) hue-rotate(170deg) brightness(99%)
contrast(101%);
$colorKeyFilterHov: invert(63%) sepia(88%) saturate(3029%) hue-rotate(154deg) brightness(101%)
Expand Down Expand Up @@ -369,8 +371,8 @@ $colorLimitCyanFg: #d3faff;
$colorLimitCyanIc: #6bedff;

// Events
$colorEventPurpleFg: #6433ff;
$colorEventRedFg: #cc0000;
$colorEventPurpleFg: #7d52ff;
$colorEventRedFg: #f40000;
$colorEventOrangeFg: orange;
$colorEventYellowFg: #ffcc00;

Expand Down
9 changes: 6 additions & 3 deletions src/styles/_constants-snow.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@ $colorGenBg: #fff;
$colorHeadBg: #eee;
$colorHeadFg: $colorBodyFg;
$colorKey: #0099cc;
$colorKeyBg: #007fad; // Darker version of colorKey for use in major buttons
$colorKeyFg: #fff;
$colorKeyHov: #00c0f6;
$colorKeyHov: lighten($colorKey, 10%); //#00c0f6;
$colorKeyBgHov: lighten($colorKeyBg, 10%);
$colorKeyFilter: invert(37%) sepia(100%) saturate(686%) hue-rotate(157deg) brightness(102%)
contrast(102%);
$colorKeyFilterHov: invert(69%) sepia(87%) saturate(3243%) hue-rotate(151deg) brightness(97%)
contrast(102%);
$colorKeySelectedBg: $colorKey;
$colorKeySubtle: pullForward($colorKey, 10%);
$uiColor: #289fec; // Resize bars, splitter bars, etc.
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
$colorA: $colorBodyFg;
Expand Down Expand Up @@ -237,8 +240,8 @@ $colorBtnFg: #fff;
$colorBtnReverseFg: $colorBodyBg;
$colorBtnReverseBg: $colorBodyFg;
$colorBtnFgHov: $colorBtnFg;
$colorBtnMajorBg: $colorKey;
$colorBtnMajorBgHov: $colorKeyHov;
$colorBtnMajorBg: $colorKeyBg;
$colorBtnMajorBgHov: $colorKeyBgHov;
$colorBtnMajorFg: $colorKeyFg;
$colorBtnMajorFgHov: pushBack($colorBtnMajorFg, 10%);
$colorBtnCautionBg: #f16f6f;
Expand Down
9 changes: 5 additions & 4 deletions src/styles/notebook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,6 @@
> * + * {
margin-top: $interiorMarginSm;
}

[class*='created-'] {
color: pullForward($colorBodyFg, 20%);
}
}

&__time {
Expand All @@ -366,6 +362,11 @@
}
}

&__text,
&__input {
color: $colorBodyFgEm !important;
}

&__text {
min-height: 22px; // Needed in Firefox when field is blank
white-space: normal;
Expand Down
5 changes: 1 addition & 4 deletions src/ui/layout/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,8 @@
&__indicators {
flex: 1 1 auto;
flex-wrap: wrap;
font-size: 11px;
justify-content: flex-end;

.c-indicator .label {
font-size: 0.9em;
}
}

/******************************* MAIN AREA */
Expand Down
2 changes: 1 addition & 1 deletion src/ui/toolbar/components/toolbar-checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
position: absolute;

&:checked + label > .c-custom-checkbox__box {
background: $colorKey;
background: $colorKeyBg;
&:before {
color: $colorKeyFg;
content: $glyph-icon-check;
Expand Down
Loading