mirror of https://github.com/halo-dev/halo
refactor: improve accessibility for login page (#6839)
#### What type of PR is this? /area core /kind improvement /milestone 2.20.x #### What this PR does / why we need it: 提升登录页面的可访问性。 #### Does this PR introduce a user-facing change? ```release-note None ```pull/6842/head
parent
f40770ad64
commit
91a69de849
|
@ -8,7 +8,7 @@
|
||||||
const i18nResources = {
|
const i18nResources = {
|
||||||
sendVerificationCodeSuccess: `[(#{js.sendVerificationCode.success})]`,
|
sendVerificationCodeSuccess: `[(#{js.sendVerificationCode.success})]`,
|
||||||
sendVerificationCodeFailed: `[(#{js.sendVerificationCode.failed})]`,
|
sendVerificationCodeFailed: `[(#{js.sendVerificationCode.failed})]`,
|
||||||
passwordConfirmationFailed: `[(#{js.passwordConfirmation.failed})]`
|
passwordConfirmationFailed: `[(#{js.passwordConfirmation.failed})]`,
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="language-switcher">
|
<div class="language-switcher">
|
||||||
<label>
|
<label for="language-select">
|
||||||
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em">
|
<svg viewBox="0 0 24 24" width="1.2em" height="1.2em">
|
||||||
<path
|
<path
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="halo-logo">
|
<div class="halo-logo">
|
||||||
<img src="/images/wordmark.svg" />
|
<img src="/images/wordmark.svg" alt="Halo" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
<ul class="pill-items">
|
<ul class="pill-items">
|
||||||
<li th:each="provider : ${socialAuthProviders}">
|
<li th:each="provider : ${socialAuthProviders}">
|
||||||
<a th:href="${provider.spec.authenticationUrl}">
|
<a th:href="${provider.spec.authenticationUrl}">
|
||||||
<img th:src="${provider.spec.logo}" />
|
<img th:src="${provider.spec.logo}" th:alt="|${provider.spec.displayName}'s icon|" />
|
||||||
<span th:text="${provider.spec.displayName}"></span>
|
<span th:text="${provider.spec.displayName}"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
<ul class="pill-items">
|
<ul class="pill-items">
|
||||||
<li th:each="method : ${otherMethods}">
|
<li th:each="method : ${otherMethods}">
|
||||||
<a th:href="${method.href}">
|
<a th:href="${method.href}">
|
||||||
<img th:src="${method.icon}" />
|
<img th:src="${method.icon}" th:alt="|${method.name}'s icon|" />
|
||||||
<span
|
<span
|
||||||
th:text="${#messages.msgOrNull('passwordResetMethods.' + method.name + '.displayName') ?: method.name}"
|
th:text="${#messages.msgOrNull('passwordResetMethods.' + method.name + '.displayName') ?: method.name}"
|
||||||
></span>
|
></span>
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
<ul class="pill-items">
|
<ul class="pill-items">
|
||||||
<li th:each="provider : ${formAuthProviders}">
|
<li th:each="provider : ${formAuthProviders}">
|
||||||
<a th:href="'/login?method=' + ${provider.metadata.name}">
|
<a th:href="'/login?method=' + ${provider.metadata.name}">
|
||||||
<img th:src="${provider.spec.logo}" />
|
<img th:src="${provider.spec.logo}" th:alt="|${provider.spec.displayName}'s icon|" />
|
||||||
<span
|
<span
|
||||||
th:text="${#messages.msgOrNull('formAuthProviders.' + provider.metadata.name + '.displayName') ?: provider.spec.displayName}"
|
th:text="${#messages.msgOrNull('formAuthProviders.' + provider.metadata.name + '.displayName') ?: provider.spec.displayName}"
|
||||||
></span>
|
></span>
|
||||||
|
@ -57,4 +57,4 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
|
@ -41,7 +41,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<div class="form-label-group">
|
<div class="form-label-group">
|
||||||
<label for="password" th:text="#{form.password.label}"> </label>
|
<label for="plainPassword" th:text="#{form.password.label}"> </label>
|
||||||
<a
|
<a
|
||||||
class="form-item-extra-link"
|
class="form-item-extra-link"
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
|
@ -55,4 +55,4 @@
|
||||||
th:replace="~{gateway_fragments/input :: password(id = 'plainPassword', name = null, required = 'true', minlength = null, maxlength = 257, enableToggle = true)}"
|
th:replace="~{gateway_fragments/input :: password(id = 'plainPassword', name = null, required = 'true', minlength = null, maxlength = 257, enableToggle = true)}"
|
||||||
></th:block>
|
></th:block>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue