Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): Перевод nuxt-router-announcer #169

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/3.api/1.components/12.nuxt-route-announcer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: '<NuxtRouteAnnouncer>'
description: 'Add a hidden element with the page title for assistive technologies.'
description: 'Добавляет скрытый элемент с заголовком страницы для вспомогательных технологий.'
navigation:
badge: Новое
links:
Expand All @@ -11,12 +11,12 @@ links:
---

::important
This component is available in Nuxt v3.12+.
Этот компонент доступен в Nuxt v3.12+.
::

## Использование

Add `<NuxtRouteAnnouncer/>` in your [`app.vue`](/docs/guide/directory-structure/app) or [`layouts/`](/docs/guide/directory-structure/layouts) to enhance accessibility by informing assistive technologies about page's title changes. This ensures that navigational changes are announced to users relying on screen readers.
Добавьте `<NuxtRouteAnnouncer/>` в ваш [`app.vue`](/docs/guide/directory-structure/app) или [`layouts/`](/docs/guide/directory-structure/layouts), чтобы повысить доступность, информируя вспомогательные технологии об изменении заголовка страницы. Это гарантирует, что пользователи, пользующиеся средствами чтения с экрана, будут уведомлены об изменениях в навигации.

```vue [app.vue]
<template>
Expand All @@ -29,7 +29,7 @@ Add `<NuxtRouteAnnouncer/>` in your [`app.vue`](/docs/guide/directory-structure/

## Слоты

You can pass custom HTML or components through the route announcer default slot.
Вы можете передавать пользовательский HTML или компоненты через слот по умолчанию анонсировщика маршрута.

```vue
<template>
Expand All @@ -43,14 +43,14 @@ You can pass custom HTML or components through the route announcer default slot.

## Входные параметры

- `atomic`: Controls if screen readers announce only changes or the entire content. Set to true for full content readout on updates, false for changes only. (default `false`)
- `politeness`: Sets the urgency for screen reader announcements: `off` (disable the announcement), `polite` (waits for silence), or `assertive` (interrupts immediately). (default `polite`)
- `atomic`: Определяет, будут ли программы чтения с экрана сообщать только об изменениях или обо всем содержимом. Установите значение `true` для полного содержимого, считываемого при обновлениях, и значение `false` только для считываний изменений. (по умолчанию `false`)
- `politeness`: Устанавливает срочность для объявлений программы чтения с экрана: `off` (отключение объявления), `polite` (ожидает тишины), или `assertive` (немедленное прерывание). (по умолчанию `polite`)

::callout
This component is optional. :br
To achieve full customization, you can implement your own one based on [its source code](https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/components/nuxt-route-announcer.ts).
Этот компонент является необязательным. :br
Чтобы добиться полной кастомизации, вы можете реализовать свой собственный, основанный на [его исходном коде](https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/app/components/nuxt-route-announcer.ts).
::

::callout
You can hook into the underlying announcer instance using [the `useRouteAnnouncer` composable](/docs/api/composables/use-route-announcer), which allows you to set a custom announcement message.
Вы можете подключиться к базовому инстансу анонсера, используя [композабл `useRouteAnnouncer`](/docs/api/composables/use-route-announcer), который позволяет установить пользовательское сообщение объявления.
::
Loading