Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ionic-team/ionic-docs
Browse files Browse the repository at this point in the history
# Conflicts:
#	docs/api/accordion.md
#	docs/api/app.md
#	docs/api/datetime.md
#	docs/api/item.md
#	docs/api/nav.md
#	docs/api/popover.md
#	docs/api/segment.md
#	docs/api/select.md
#	docs/api/tab.md
#	docs/api/tabs.md
#	docs/updating/8-0.md
  • Loading branch information
rdlabo committed Nov 24, 2024
2 parents d663d73 + 87ae7a9 commit 7f91361
Show file tree
Hide file tree
Showing 84 changed files with 3,612 additions and 2,029 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ The Ionic documentation's `main` branch is deployed automatically and separately

This repo is licensed and managed separately from Ionic itself.

By contributing to this repo, you agree to have your contributions licensed under the Apache 2.0 license. See [LICENSE](../LICENSE) for the full license text.
By contributing to this repo, you agree to have your contributions licensed under the Apache 2.0 license. See [LICENSE](LICENSE) for the full license text.
20 changes: 10 additions & 10 deletions docs/api/accordion.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,19 @@ import AccessibilityAnimations from '@site/static/usage/v8/accordion/accessibili

<AccessibilityAnimations />

### キーボードナビゲーション
### キーボードインタラクション

`ion-accordion-group` の中で使用する場合、`ion-accordion` はキーボードによる操作を完全にサポートしています。次の表は、それぞれのキーが何をするのかの詳細です。

| Key | Function |
| ------------------ | ------------------------------------------------------------ |
| `Space` or `Enter` | When focus is on the accordion header, the accordion will collapse or expand depending on the state of the component. |
| `Tab` | Moves focus to the next focusable element. |
| `Shift` + `Tab` | Moves focus to the previous focusable element. |
| `Down Arrow` | - When focus is on an accordion header, moves focus to the next accordion header. <br />- When focus is on the last accordion header, moves focus to the first accordion header. |
| `Up Arrow` | - When focus is on an accordion header, moves focus to the previous accordion header. <br />- When focus is on the first accordion header, moves focus to the last accordion header. |
| `Home` | When focus is on an accordion header, moves focus to the first accordion header. |
| `End` | When focus is on an accordion header, moves focus to the last accordion header. |
| Key | Description |
| ------------------------------------ | ------------------------------------------------------------ |
| <kbd>Space</kbd> or <kbd>Enter</kbd> | When focus is on the accordion header, the accordion will collapse or expand depending on the state of the component. |
| <kbd>Tab</kbd> | Moves focus to the next focusable element. |
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | Moves focus to the previous focusable element. |
| <kbd>Down Arrow</kbd> | - When focus is on an accordion header, moves focus to the next accordion header. <br />- When focus is on the last accordion header, moves focus to the first accordion header. |
| <kbd>Up Arrow</kbd> | - When focus is on an accordion header, moves focus to the previous accordion header. <br />- When focus is on the first accordion header, moves focus to the last accordion header. |
| <kbd>Home</kbd> | When focus is on an accordion header, moves focus to the first accordion header. |
| <kbd>End</kbd> | When focus is on an accordion header, moves focus to the last accordion header. |

## パフォーマンス

Expand Down
10 changes: 8 additions & 2 deletions docs/api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import Slots from '@ionic-internal/component-api/v8/app/slots.md';

import EncapsulationPill from '@components/page/api/EncapsulationPill';


AppはIonicアプリケーションのコンテナ要素です。プロジェクトごとに `<ion-app>` 要素は1つだけにしてください。アプリケーションには、menus, headers, content, footersなど、多くのIonicコンポーネントを含めることができます。オーバーレイコンポーネントは、表示されるときに `<ion-app>` に追加されます。
AppはIonicアプリケーションのコンテナ要素です。1つのプロジェクトにつき`<ion-app>`要素は1つだけです。アプリはメニュー、ヘッダー、コンテンツ、フッターなど多くのIonicコンポーネントを持つことができます。オーバーレイコンポーネントは表示時に `<ion-app>` に追加されます。

`ion-app`を使用すると、以下の動作が可能になります。

Expand All @@ -27,6 +26,13 @@ AppはIonicアプリケーションのコンテナ要素です。プロジェク
* Material Design モードでのボタン操作時の[Ripple effect](./リップルエフェクト) が使えます。
* Ionicアプリの使用感をよりネイティブなものにする、その他のタップやフォーカスのユーティリティが使えます。

## Programmatic Focus

Ionic offers focus utilities for components with the `ion-focusable` class. These utilities automatically manage focus for components when certain keyboard keys, like <kbd>Tab</kbd>, are pressed. Components can also be programmatically focused in response to user actions using the `setFocus` method from `ion-app`.

import SetFocus from '@site/static/usage/v8/app/set-focus/index.md';

<SetFocus />

## プロパティ
<Props />
Expand Down
38 changes: 19 additions & 19 deletions docs/api/datetime.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Ionic Frameworkでは、[Intl.DatetimeFormat](https://developer.mozilla.org/en-U

### 月と年の選択

月と年の選択は、 `presentation` プロパティに `month-year` , `year-month` , `month` , または `year` を渡すことで行うことができます。
月と年の選択は、 `presentation` プロパティに `month-year` , `month` , または `year` を渡すことで行うことができます。

この例では、 `month-year` を設定した datetime を示しています。

Expand Down Expand Up @@ -416,30 +416,30 @@ JavaScriptで日付を扱うために [date-fns](https://date-fns.org) を使う

## アクセシビリティ

### キーボードナビゲーション
### キーボードインタラクション

`ion-datetime` は、コンポーネント内のフォーカス可能な要素間を移動するためのフルキーボードサポートを備えています。次の表は、それぞれのキーが何をするのかの詳細です。

| Key | Function |
| ------------------ | ------------------------------------------------------------ |
| `Tab` | Moves focus to the next focusable element. |
| `Shift` + `Tab` | Moves focus to the previous focusable element. |
| `Space` or `Enter` | Clicks the focusable element. |
| Key | Description |
| ------------------------------------ | ---------------------------------------------- |
| <kbd>Tab</kbd> | Moves focus to the next focusable element. |
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | Moves focus to the previous focusable element. |
| <kbd>Space</kbd> or <kbd>Enter</kbd> | Clicks the focusable element. |

#### 日付の表示

| Key | Function |
| ------------------ | ------------------------------------------------------------ |
| `ArrowUp` | Moves focus to the same day of the previous week. |
| `ArrowDown` | Moves focus to the same day of the next week. |
| `ArrowRight` | Moves focus to the next day. |
| `ArrowLeft` | Moves focus to the previous day. |
| `Home` | Moves focus to the first day of the current week. |
| `End` | Moves focus to the last day of the current week. |
| `PageUp` | Changes the grid of dates to the previous month. |
| `PageDown` | Changes the grid of dates to the next month. |
| `Shift` + `PageUp` | Changes the grid of dates to the previous year. |
| `Shift` + `PageDown` | Changes the grid of dates to the next year. |
| Key | Description |
| -------------------------------------- | ------------------------------------------------- |
| <kbd>ArrowUp</kbd> | Moves focus to the same day of the previous week. |
| <kbd>ArrowDown</kbd> | Moves focus to the same day of the next week. |
| <kbd>ArrowRight</kbd> | Moves focus to the next day. |
| <kbd>ArrowLeft</kbd> | Moves focus to the previous day. |
| <kbd>Home</kbd> | Moves focus to the first day of the current week. |
| <kbd>End</kbd> | Moves focus to the last day of the current week. |
| <kbd>PageUp</kbd> | Changes the grid of dates to the previous month. |
| <kbd>PageDown</kbd> | Changes the grid of dates to the next month. |
| <kbd>Shift</kbd> + <kbd>PageUp</kbd> | Changes the grid of dates to the previous year. |
| <kbd>Shift</kbd> + <kbd>PageDown</kbd> | Changes the grid of dates to the next year. |

#### 時刻、月、年のホイール

Expand Down
49 changes: 40 additions & 9 deletions docs/api/item.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import Basic from '@site/static/usage/v8/item/basic/index.md';

アイコン・ボタンのように、アイテムとのインタラクションにビジュアルが必要な場合、そのビジュアルはサポート・ビジュアルではなく、 [アクション](#actions) となります。

<BestPracticeFigure
<BestPracticeFigure
text="Supporting visuals should be rendered in a consistent manner. This makes the information in each item easier to parse."
doText="Align visuals on the same side in a list"
doNotText="Don't render visuals with different alignments in the same list"
Expand All @@ -60,7 +60,7 @@ import SupportingVisuals from '@site/static/usage/v8/item/content-types/supporti

テキスト・コンテンツ・タイプには、フォーム制御ラベルやその他の可視テキストが含まれます。このテキストは項目の意図を示す役割を果たします。テキストは短く、要点をまとめるようにしてください。

<BestPracticeFigure
<BestPracticeFigure
text={<>If you find that you need a few more sentences to clarify the item's purpose, consider moving the additional sentences to a <a href={useBaseUrl('api/note')}>Note</a> at the bottom of the list. Adding the item to its own list makes it clear which item the text is associated with.</>}
doText="Move long text outside of the list"
doNotText="Don't try to fit long text in an item"
Expand All @@ -82,15 +82,15 @@ import Text from '@site/static/usage/v8/item/content-types/text/index.md';

メタデータは、ステータステキストやカウントのようなアイテムの追加コンテキストを提供します。Badge](./badge)[Note](./note)のようなコンポーネントは、メタデータを表示する素晴らしい方法です。

<BestPracticeFigure
<BestPracticeFigure
text="Limit the amount of metadata you include to only the most relevant information."
doText="Add only the most important metadata"
doNotText="Don't add too much metadata as it can overwhelm or confuse the user."
doImage={<img alt="A list that contains several items, each representing a different to-do list. A count of how many tasks in each to-do list is placed at the end of each item." src={useBaseUrl('img/item/metadata-relevant-do.jpg')} />}
doNotImage={<img alt="A list that contains several items, each representing a different to-do list. Two counts are placed at the end of each item: One count that states the total number of tasks, and another count that states the total number of tasks that are due today." src={useBaseUrl('img/item/metadata-relevant-do-not.jpg')} />}
/>

<BestPracticeFigure
<BestPracticeFigure
text="Developers should also consider how important the metadata is. Drawing attention to the metadata may be helpful for the user or it may distract them from the more important information depending on the use case."
doText="Prioritize the most important content."
cautionText="Prioritized metadata may distract from other important content."
Expand All @@ -112,7 +112,7 @@ import Metadata from '@site/static/usage/v8/item/content-types/metadata/index.md

開発者は、<a href="https://dequeuniversity.com/rules/axe/4.4/nested-interactive">入れ子になったインタラクティブ機能</a>を作成することは避けるべきです。例えば、 `button` プロパティが `true` に設定されている場合、開発者はアイテムのメインコンテンツ内にボタンを追加することを避けるべきです。

<BestPracticeFigure
<BestPracticeFigure
text={<>Actions can be added by using the <a href={useBaseUrl('api/item-sliding')}>Item Sliding</a> component. Actions can also be placed directly inside of the Item without the use of Item Sliding, but this should be limited to no more than 2 actions.</>}
doText={<>Use an <a href={useBaseUrl('api/item-sliding')}>Item Sliding</a> to reveal multiple actions by swiping on the Item.</>}
doNotText="Don't put more than 2 actions within an Item."
Expand All @@ -130,23 +130,23 @@ import Actions from '@site/static/usage/v8/item/content-types/actions/index.md';

コントロールは、チェックボックス、入力、ラジオなどのフォームコンポーネントです。リスト内の各項目は、画面スペースの制約上、最大でも2つのコントロールを持つ必要があります。

<BestPracticeFigure
<BestPracticeFigure
text={<>Metadata such as helper text or character counts should not be used on form controls in list views. If such metadata is needed, the form control should be placed outside of a list. <a href={useBaseUrl('api/input#filled-inputs')}>Filled Inputs</a> are a great way of visually defining the input container outside of a list.</>}
doText="Place inputs with metadata outside of the list."
doNotText="Don't put metadata for inputs in the list."
doImage={<img alt="There is an email input and a password input. Both have helper text associated with them. Since both are placed outside of a list it is clear which input each helper text is associated with." src={useBaseUrl('img/item/controls-metadata-list-do.jpg')} />}
doNotImage={<img alt="There is a list containing an email input and a password input. Both have helper texts associated with them. However, the divider between each item and between the helper text makes it hard to tell which input each helper text is associated with." src={useBaseUrl('img/item/controls-metadata-list-do-not.jpg')} />}
/>

<BestPracticeFigure
<BestPracticeFigure
text={<>Alternatively, the metadata can be placed in a <a href={useBaseUrl('api/note')}>Note</a> at the bottom of the list.</>}
doText="Place metadata for inputs at the end of a list."
doNotText="Don't put metadata for inputs in the list."
doImage={<img alt="There are two lists of inputs. The first list contains a password input. Below that list contains text that says 'Password must be at least 16 characters'. The second list contains an email input. This second list is separated so the password length requirement text is clearly associated with the password input above." src={useBaseUrl('img/item/controls-metadata-do.jpg')} />}
doNotImage={<img alt="There is one list of inputs. One of the inputs is a password input with text below the input that says 'Password must be at least 16 characters'. However, this text is placed directly above another input, so it's not immediately clear which input the text is associated with." src={useBaseUrl('img/item/controls-metadata-do-not.jpg')} />}
/>

<BestPracticeFigure
<BestPracticeFigure
text={<>Items should typically have no more than two controls. If you need more controls, consider adding the additional controls in a <a href="useBaseUrl('api/modal')">Modal</a> that is accessible from the item.</>}
doText="Move additional controls to a submenu accessible from the item."
doNotText="Don't use more than two controls within an item."
Expand Down Expand Up @@ -245,7 +245,38 @@ import CSSProps from '@site/static/usage/v8/item/theming/css-properties/index.md
3. アイテムは決して[入れ子になったインタラクティヴ](https://dequeuniversity.com/rules/axe/4.4/nested-interactive)をレンダリングすべきではありません。入れ子になったインタラクティブ要素が使用されている場合、スクリーンリーダーは正しいインタラクティブ要素を選択することができません。例えば、`button="true"`を持つ`ion-item`の中にボタンを置くことは避けてください。
4. コンテントタイプ](#content-types)を正しく使用してください。Itemコンポーネントは、[List](./list)内の行として設計されており、汎用コンテナとして使用すべきではありません。

## プロパティ
## アクセシビリティ

### キーボードインタラクション

An `<ion-item>` has the following keyboard interactions when any of these conditions are met:
- The `button` property is set to `"true"`, rendering a native `<button>` element.
- The `href` property is set, rendering a native `<a>` element.
- The `routerLink` property is set, rendering a native `<a>` element.

| Key | Description |
| --------------------------------- | ---------------------------------------------- |
| <kbd>Tab</kbd> | Moves focus to the next focusable element. |
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | Moves focus to the previous focusable element. |

#### Button

When an `<ion-item>` renders a native `<button>` element, the keyboard interactions follow the same pattern as the [button role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role#keyboard_interactions):

| Key | Description |
| ---------------- | --------------------------------------------------------------------------- |
| <kbd>Enter</kbd> | Activates the item, triggering its `click` event. If the item is within a form and has `type` set to `"submit"`, it submits the form. |
| <kbd>Space</kbd> | Activates the item, triggering its `click` event. Does not submit the form, even if the item `type` is `"submit"`. |

#### Anchor

When an `<ion-item>` renders a native `<a>` element, the keyboard interactions follow the same pattern as the [link role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/link_role):

| Key | Description |
| ---------------- | ---------------------------------------------------------------------------------------- |
| <kbd>Enter</kbd> | Activates the item, navigating to the linked page or moving focus to the in-page target. |

## Properties
<Props />

## イベント
Expand Down
Loading

0 comments on commit 7f91361

Please sign in to comment.