Clean up html structure (#1869)

Fix different html syntax errors to improve a11y.
This commit is contained in:
Eduard Heimbuch
2021-11-29 13:57:05 +01:00
committed by GitHub
parent 542a5aac59
commit 5eb1d9cd22
19 changed files with 105 additions and 708 deletions

View File

@@ -77,6 +77,7 @@ const FilterInput: FC<Props> = ({ filter, value, testId, placeholder, autoFocus,
onChange={event => setStateValue(event.target.value)}
autoFocus={autoFocus || false}
aria-describedby={id}
aria-label={t("filterEntries")}
{...createAttributesForTesting(testId)}
/>
<span className="icon is-small is-left">

View File

@@ -69,7 +69,7 @@ const InnerSelect: FC<FieldProps<BaseProps, HTMLSelectElement, string>> = ({
const field = useInnerRef(props.innerRef);
let opts = options;
if (value && addValueToOptions && !options.some((o) => o.value === value)) {
if (value && addValueToOptions && !options.some(o => o.value === value)) {
opts = [{ label: value, value }, ...options];
}
@@ -124,11 +124,11 @@ const InnerSelect: FC<FieldProps<BaseProps, HTMLSelectElement, string>> = ({
onChange={handleInput}
onBlur={handleBlur}
disabled={disabled}
aria-labelledby={a11yId}
aria-describedby={helpId}
aria-labelledby={label ? a11yId : undefined}
aria-describedby={helpText ? helpId : undefined}
{...createAttributesForTesting(testId)}
>
{opts.map((opt) => {
{opts.map(opt => {
return (
<option value={opt.value} key={"KEY_" + opt.value}>
{opt.label}