mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Improve a11y (#1841)
Improve accessibility by removing unnecessary tags without hrefs. Also remove many eslint errors and warnings.
This commit is contained in:
@@ -45,7 +45,7 @@ const ConfigForm: FC<Props> = ({
|
||||
loading,
|
||||
configReadPermission,
|
||||
configUpdatePermission,
|
||||
namespaceStrategies
|
||||
namespaceStrategies,
|
||||
}) => {
|
||||
const [t] = useTranslation("config");
|
||||
const [innerConfig, setInnerConfig] = useState<Config>({
|
||||
@@ -74,7 +74,7 @@ const ConfigForm: FC<Props> = ({
|
||||
mailDomainName: "",
|
||||
emergencyContacts: [],
|
||||
enabledApiKeys: true,
|
||||
_links: {}
|
||||
_links: {},
|
||||
});
|
||||
const [showNotification, setShowNotification] = useState(false);
|
||||
const [changed, setChanged] = useState(false);
|
||||
@@ -83,7 +83,7 @@ const ConfigForm: FC<Props> = ({
|
||||
loginAttemptLimit: boolean;
|
||||
}>({
|
||||
loginAttemptLimitTimeout: false,
|
||||
loginAttemptLimit: false
|
||||
loginAttemptLimit: false,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
InputField,
|
||||
MemberNameTagGroup,
|
||||
AutocompleteAddEntryToTableField,
|
||||
Select
|
||||
Select,
|
||||
} from "@scm-manager/ui-components";
|
||||
import NamespaceStrategySelect from "./NamespaceStrategySelect";
|
||||
|
||||
@@ -68,7 +68,7 @@ const GeneralSettings: FC<Props> = ({
|
||||
namespaceStrategy,
|
||||
namespaceStrategies,
|
||||
onChange,
|
||||
hasUpdatePermission
|
||||
hasUpdatePermission,
|
||||
}) => {
|
||||
const { t } = useTranslation("config");
|
||||
const userSuggestions = useUserSuggestions();
|
||||
@@ -181,7 +181,7 @@ const GeneralSettings: FC<Props> = ({
|
||||
options={[
|
||||
{ label: t("general-settings.anonymousMode.full"), value: "FULL" },
|
||||
{ label: t("general-settings.anonymousMode.protocolOnly"), value: "PROTOCOL_ONLY" },
|
||||
{ label: t("general-settings.anonymousMode.off"), value: "OFF" }
|
||||
{ label: t("general-settings.anonymousMode.off"), value: "OFF" },
|
||||
]}
|
||||
helpText={t("help.allowAnonymousAccessHelpText")}
|
||||
testId={"anonymous-mode-select"}
|
||||
|
||||
@@ -43,7 +43,7 @@ class LoginAttempt extends React.Component<Props, State> {
|
||||
|
||||
this.state = {
|
||||
loginAttemptLimitError: false,
|
||||
loginAttemptLimitTimeoutError: false
|
||||
loginAttemptLimitTimeoutError: false,
|
||||
};
|
||||
}
|
||||
render() {
|
||||
@@ -84,7 +84,7 @@ class LoginAttempt extends React.Component<Props, State> {
|
||||
handleLoginAttemptLimitChange = (value: string) => {
|
||||
this.setState({
|
||||
...this.state,
|
||||
loginAttemptLimitError: !validator.isNumberValid(value)
|
||||
loginAttemptLimitError: !validator.isNumberValid(value),
|
||||
});
|
||||
this.props.onChange(validator.isNumberValid(value), value, "loginAttemptLimit");
|
||||
};
|
||||
@@ -92,7 +92,7 @@ class LoginAttempt extends React.Component<Props, State> {
|
||||
handleLoginAttemptLimitTimeoutChange = (value: string) => {
|
||||
this.setState({
|
||||
...this.state,
|
||||
loginAttemptLimitTimeoutError: !validator.isNumberValid(value)
|
||||
loginAttemptLimitTimeoutError: !validator.isNumberValid(value),
|
||||
});
|
||||
this.props.onChange(validator.isNumberValid(value), value, "loginAttemptLimitTimeout");
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ class NamespaceStrategySelect extends React.Component<Props> {
|
||||
available = namespaceStrategies.available;
|
||||
}
|
||||
|
||||
return available.map(ns => {
|
||||
return available.map((ns) => {
|
||||
const key = "namespaceStrategies." + ns;
|
||||
let label = t(key);
|
||||
if (label === key) {
|
||||
@@ -51,7 +51,7 @@ class NamespaceStrategySelect extends React.Component<Props> {
|
||||
}
|
||||
return {
|
||||
value: ns,
|
||||
label: label
|
||||
label: label,
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
@@ -39,16 +39,8 @@ type Props = WithTranslation & {
|
||||
|
||||
class ProxySettings extends React.Component<Props> {
|
||||
render() {
|
||||
const {
|
||||
t,
|
||||
proxyPassword,
|
||||
proxyPort,
|
||||
proxyServer,
|
||||
proxyUser,
|
||||
enableProxy,
|
||||
proxyExcludes,
|
||||
hasUpdatePermission,
|
||||
} = this.props;
|
||||
const { t, proxyPassword, proxyPort, proxyServer, proxyUser, enableProxy, proxyExcludes, hasUpdatePermission } =
|
||||
this.props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user