Skip to content

Commit 6c40b18

Browse files
fix: improve contrast in Games Block for better low-vision accessibility (#88)
1 parent 15d55ac commit 6c40b18

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/editors/containers/EditorContainer/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ interface Props extends EditorComponent {
5656
onSave?: Function | null;
5757
saveButtonLabel?: string | null;
5858
saveButtonAriaLabel?: string | null;
59+
className?: string;
5960
}
6061

6162
const EditorContainer: React.FC<Props> = ({
@@ -68,6 +69,7 @@ const EditorContainer: React.FC<Props> = ({
6869
onSave: customOnSave = null,
6970
saveButtonLabel = null,
7071
saveButtonAriaLabel = null,
72+
className = '',
7173
}) => {
7274
const intl = useIntl();
7375
const dispatch = useDispatch();
@@ -171,7 +173,7 @@ const EditorContainer: React.FC<Props> = ({
171173
/>
172174
</div>
173175
</ModalDialog.Header>
174-
<ModalDialog.Body className="pb-0">
176+
<ModalDialog.Body className={className ? `pb-0 ${className}` : 'pb-0'}>
175177
<div ref={errorAlertRef}>
176178
<ErrorAlert
177179
isError={uploadFailed}

src/editors/containers/GameEditor/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ export const GameEditor = ({
763763
onClose={onClose}
764764
isDirty={() => isDirty}
765765
validateEntry={validateAllCards}
766+
className="game-editor"
766767
>
767768
<div className="editor-body h-75 overflow-auto">
768769
{Object.keys(validationErrors).length > 0 && isAlertVisible && (

src/editors/containers/GameEditor/index.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
padding: 8px 0;
1010
align-items: flex-start;
1111
width: 100%;
12-
background: var(--extras-white, #FFFFFF);
1312
}
1413

1514
.terms {
@@ -301,3 +300,7 @@ width: 100%;
301300
.shuffle-toggle-button:focus::before {
302301
display: none;
303302
}
303+
304+
.game-editor {
305+
background-color: var(--pgn-color-light-300);
306+
}

0 commit comments

Comments
 (0)