mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
fix settings pages a11y issues
This commit is contained in:
@@ -17,6 +17,7 @@ import Popover from '../Popover';
|
|||||||
function CodeDetail({ value, label, mode, rows, helpText, dataCy }) {
|
function CodeDetail({ value, label, mode, rows, helpText, dataCy }) {
|
||||||
const labelCy = dataCy ? `${dataCy}-label` : null;
|
const labelCy = dataCy ? `${dataCy}-label` : null;
|
||||||
const valueCy = dataCy ? `${dataCy}-value` : null;
|
const valueCy = dataCy ? `${dataCy}-value` : null;
|
||||||
|
const editorId = dataCy ? `${dataCy}-editor` : 'code-editor';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -27,12 +28,13 @@ function CodeDetail({ value, label, mode, rows, helpText, dataCy }) {
|
|||||||
data-cy={labelCy}
|
data-cy={labelCy}
|
||||||
>
|
>
|
||||||
<div className="pf-c-form__label">
|
<div className="pf-c-form__label">
|
||||||
<span
|
<label
|
||||||
|
htmlFor={editorId}
|
||||||
className="pf-c-form__label-text"
|
className="pf-c-form__label-text"
|
||||||
css="font-weight: var(--pf-global--FontWeight--bold)"
|
css="font-weight: var(--pf-global--FontWeight--bold)"
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
</span>
|
</label>
|
||||||
{helpText && (
|
{helpText && (
|
||||||
<Popover header={label} content={helpText} id={dataCy} />
|
<Popover header={label} content={helpText} id={dataCy} />
|
||||||
)}
|
)}
|
||||||
@@ -45,6 +47,7 @@ function CodeDetail({ value, label, mode, rows, helpText, dataCy }) {
|
|||||||
data-cy={valueCy}
|
data-cy={valueCy}
|
||||||
>
|
>
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
|
id={editorId}
|
||||||
mode={mode}
|
mode={mode}
|
||||||
value={value}
|
value={value}
|
||||||
readOnly
|
readOnly
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ const DetailValue = styled(
|
|||||||
${(props) =>
|
${(props) =>
|
||||||
(props.isEncrypted || props.isNotConfigured) &&
|
(props.isEncrypted || props.isNotConfigured) &&
|
||||||
`
|
`
|
||||||
color: var(--pf-global--Color--400);
|
color: var(--pf-global--disabled-color--100);
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user