Skip to content

Commit

Permalink
2023/06/13 時点の英語版に同期
Browse files Browse the repository at this point in the history
  • Loading branch information
mfuji09 committed Jul 10, 2023
1 parent ac1a2f5 commit 910e892
Showing 1 changed file with 59 additions and 17 deletions.
76 changes: 59 additions & 17 deletions files/ja/web/html/element/progress/index.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
---
title: '<progress>: 進捗表示要素'
title: "<progress>: 進捗インジケーター要素"
slug: Web/HTML/Element/progress
l10n:
sourceCommit: e04d8d2766c468f149445c0bf438d09f9b2d188c
---

{{HTMLSidebar}}

**HTML の `<progress>` 要素**、タスクの進捗状況を表示します。プログレスバーとしてよく表示されます
**`<progress>`**[HTML](/ja/docs/Web/HTML) の要素で、タスクの進捗状況を表示します。ふつうはプログレスバーとして表示されます

{{EmbedInteractiveExample("pages/tabbed/progress.html", "tabbed-standard")}}

<table class="properties">
<tbody>
<tr>
<th scope="row">
<a href="/ja/docs/Web/HTML/Content_categories">コンテンツカテゴリ</a>
<a href="/ja/docs/Web/HTML/Content_categories">コンテンツカテゴリー</a>
</th>
<td>
<a href="/ja/docs/Web/HTML/Content_categories#フローコンテンツ"
>フローコンテンツ</a
>、<a href="/ja/docs/Web/HTML/Content_categories#記述コンテンツ"
>記述コンテンツ</a
>、ラベル付け可能コンテンツ、知覚可能コンテンツ
<a href="/ja/docs/Web/HTML/Content_categories#フローコンテンツ">フローコンテンツ</a
>、
<a href="/ja/docs/Web/HTML/Content_categories#記述コンテンツ">記述コンテンツ</a>、ラベル付け可能コンテンツ、
<a href="/ja/docs/Web/HTML/Content_categories#知覚可能コンテンツ">知覚可能コンテンツ</a>
</td>
</tr>
<tr>
<th scope="row">許可されている内容</th>
<td>
<a href="/ja/docs/Web/HTML/Content_categories#記述コンテンツ"
>記述コンテンツ</a
>。ただし、子要素に
<code>&#x3C;progress></code> 要素を含めてはならない。
<a href="/ja/docs/Web/HTML/Content_categories#記述コンテンツ">記述コンテンツ</a>。ただし、子要素に <code>&#x3C;progress></code> 要素を含めてはならない。
</td>
</tr>
<tr>
Expand All @@ -39,15 +37,13 @@ slug: Web/HTML/Element/progress
<tr>
<th scope="row">許可されている親要素</th>
<td>
<a href="/ja/docs/Web/HTML/Content_categories#記述コンテンツ"
>記述コンテンツ</a
>
<a href="/ja/docs/Web/HTML/Content_categories#記述コンテンツ">記述コンテンツ</a>
を受け入れるすべての要素
</td>
</tr>
<tr>
<th scope="row">暗黙の ARIA ロール</th>
<td><code><a href="/ja/docs/Web/Accessibility/ARIA/Roles/progressbar_role">progressbar</a></code></td>
<td><a href="/ja/docs/Web/Accessibility/ARIA/Roles/progressbar_role"><code>progressbar</code></a></td>
</tr>
<tr>
<th scope="row">許可されている ARIA ロール</th>
Expand All @@ -71,7 +67,7 @@ slug: Web/HTML/Element/progress

> **メモ:** {{htmlelement("meter")}} 要素とは異なり、最小値は常に 0 で、`min` 属性は `<progress>` 要素では許可されていません。
> **メモ:** {{cssxref(":indeterminate")}} 擬似クラスは、不定状態のプログレスバーにマッチします。プログレスバーを値がある状態から不定の状態に変更するには、 {{domxref("Element.removeAttribute", "element.removeAttribute('value')")}}. で value 属性を削除しなければなりません。
> **メモ:** {{cssxref(":indeterminate")}} 擬似クラスは、不定状態のプログレスバーに一致します。プログレスバーを値がある状態から不定の状態に変更するには、 {{domxref("Element.removeAttribute", "element.removeAttribute('value')")}} で value 属性を削除しなければなりません。
##

Expand All @@ -83,6 +79,52 @@ slug: Web/HTML/Element/progress

{{ EmbedLiveSample("Examples", 200, 50) }}

## アクセシビリティの考慮

### ラベル付け

`<progress>` を使用する場合、ふつうはアクセシビリティのあるラベルを提供しましょう。ARIA 標準のラベル付け属性 [`aria-labelledby`](/ja/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby)[`aria-label`](/ja/docs/Web/Accessibility/ARIA/Attributes/aria-label)`role="progressbar"` の要素と同様に使用できますが、`<progress>` を用いる場合、代わりに {{htmlelement("label")}} 要素を使用することができます。

> **メモ:** 要素のタグの間に配置されたテキストはアクセシビリティラベルではありません。この要素に対応していない古いブラウザー用の代替用としてのみ推奨されます。
####

```html
<label>
文書をアップロード中: <progress value="70" max="100">70 %</progress>
</label>

<!-- OR -->
<br />

<label for="progress-bar">文書をアップロード中</label>
<progress id="progress-bar" value="70" max="100">70 %</progress>
```

#### 結果

{{EmbedLiveSample('Labelling')}}

### 特定の領域を記述

`<progress>` 要素がページのある節の読み込みの進捗を表している場合、[`aria-describedby`](/ja/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) を使用して状況を指し、更新中の節に [`aria-busy="true"`](/ja/docs/Web/Accessibility/ARIA/Attributes/aria-busy) を設定し、読み込みが完了したら `aria-busy` 属性を解除してください。

####

```html
<div aria-busy="true" aria-describedby="progress-bar">
<!-- content is for this region is loading -->
</div>

<!-- ... -->

<progress id="progress-bar" aria-label="Content loading…"></progress>
```

##### 結果

{{EmbedLiveSample('Describing a particular region')}}

## 仕様書

{{Specifications}}
Expand Down

0 comments on commit 910e892

Please sign in to comment.