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: Double colour profile read fix (fixes #121) #122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
15 changes: 13 additions & 2 deletions templates/Visua11ySettings.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Adapt from 'core/js/adapt';
import { templates } from 'core/js/reactHelpers';
import React from 'react';
import a11y from 'core/js/a11y';

export default function Visua11ySettings(props) {
const visua11y = Adapt.visua11y;
Expand Down Expand Up @@ -37,11 +38,21 @@ export default function Visua11ySettings(props) {
{config._colorProfile._isEnabled &&
<div className='colorprofileid'>
<templates.Visua11yPreview {...config}/>
<label className='visua11ysettings__item-label' htmlFor='colorProfileId'>
<label
className='visua11ysettings__item-label'
htmlFor='colorProfileId'
aria-hidden={true}
>
<div className='icon' aria-hidden='true'></div>
{config._colorProfile.title}
</label>
<select id='colorProfileId' name='colorProfileId' onChange={onChange} value={visua11y.colorProfileId}>
<select
id='colorProfileId'
name='colorProfileId'
onChange={onChange}
value={visua11y.colorProfileId}
aria-label={a11y.normalize(config._colorProfile.title)}
>
{visua11y.colorProfiles.map(({ name, _id }) => <option key={_id} value={_id}>{name}</option>)}
</select>
</div>
Expand Down
Loading