Update frontend components for accessibility and functionality improvements
- Modified docker-compose.dev.yml to conditionally run npm install based on the presence of package-lock.json. - Upgraded Nuxt version in package-lock.json from 3.21.1 to 4.3.1 for enhanced features. - Enhanced ConfirmModal component with aria-modal attribute for better accessibility. - Updated MapErrorBoundary component's error message for clarity. - Added role and aria-label attributes to MapView and MapSearch components for improved screen reader support. - Refactored various components to manage focus behavior on modal close, enhancing user experience. - Improved ToastContainer styling for better responsiveness and visibility. - Updated layout components to include skip navigation links for improved accessibility.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
<fieldset class="fieldset">
|
||||
<label class="label" for="user">User</label>
|
||||
<input
|
||||
ref="userInputRef"
|
||||
id="user"
|
||||
v-model="user"
|
||||
type="text"
|
||||
@@ -44,6 +45,8 @@
|
||||
<script setup lang="ts">
|
||||
// No auth required; auth.global skips this path
|
||||
|
||||
useHead({ title: 'Login – HnH Map' })
|
||||
|
||||
const user = ref('')
|
||||
const pass = ref('')
|
||||
const oauthProviders = ref<string[]>([])
|
||||
@@ -54,8 +57,13 @@ const { loading, error, run } = useFormSubmit('Login failed')
|
||||
|
||||
const redirect = computed(() => (route.query.redirect as string) || '')
|
||||
|
||||
const userInputRef = ref<HTMLInputElement | null>(null)
|
||||
|
||||
onMounted(async () => {
|
||||
oauthProviders.value = await api.oauthProviders()
|
||||
if (import.meta.client && window.matchMedia('(pointer: fine)').matches) {
|
||||
nextTick(() => userInputRef.value?.focus())
|
||||
}
|
||||
})
|
||||
|
||||
async function submit() {
|
||||
|
||||
Reference in New Issue
Block a user