mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-12-22 00:09:47 +01:00
Clean up html structure (#1869)
Fix different html syntax errors to improve a11y.
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user