diff --git a/techniques/client-side-script/SCR34.html b/techniques/client-side-script/SCR34.html index 82a106b97..a88df3db1 100644 --- a/techniques/client-side-script/SCR34.html +++ b/techniques/client-side-script/SCR34.html @@ -1,6 +1,6 @@ -
このWCAG 2.2 テクニック集の日本語訳は作業中となっています。WCAG 2.1 達成方法集の日本語訳をご利用いただけます。[ WCAG 2.1 達成方法集 ]
This technique relates to:
このテクニックは、次に関連する:
This technique applies to client-side scripting.
このテクニックは、クライアントサイドスクリプティングに適用される。
The objective of this technique is to calculate the size and position of elements in a way that will scale appropriately as the text size is scaled.
There are four properties in JavaScript that help determine the size and position of elements:
このテクニックの目的は、文字サイズが拡大縮小されるのに従って、適切に拡大縮小する方法で要素のサイズ及びポジションを計算することである。
ここに要素のサイズとポジションを決める JavaScript の四つのプロパティがある:
offsetHeight
offsetWidth
offsetLeft
offsetParent
offsetTop
Calculating the height and width using offsetHeight and offsetWidth is straightforward, but when calculating an object's left and top position as absolute values, we need to consider the parent element. The calculatePosition function below iterates through all of an element's parent nodes to give a final value. The function takes two parameters: objElement (the name of the element in question), and the offset property (offsetLeft or offsetTop):
calculatePosition
objElement
offsetHeight や offsetWidth を用いて高さや幅を定めることは簡単である、しかし、オブジェクトの左とトップの位置を絶対配置の値として定める時、親要素を考える必要がある。下記において、calculatePosition 関数は、要素におけるすべての親ノードの最終的な値が決定するまで繰り返されている。その関数は objElement (当該の要素の名前) とオフセットプロパティ (offsetLeft 又は offsetTop) の二つの引数を取っている。
function calculatePosition(objElement, strOffset { var iOffset = 0; @@ -147,7 +141,7 @@ Example 1: Calculating the size and position of elements in a way that will return iOffset; }
The following example illustrates using the function above by aligning an object beneath a reference object, the same distance from the left:
次の事例は、上の関数がオブジェクトを、参照オブジェクトの下、かつ、左から同じ距離に配置するために用いられていることを示している:
// Get a reference object var objReference = document.getElementById('refobject'); @@ -166,7 +160,7 @@ Example 1: Calculating the size and position of elements in a way that will - Related Techniques + 関連テクニック C12: Using percent for font sizes C14: Using em units for font sizes @@ -177,20 +171,20 @@ Related Techniques - Tests + 検証 - Procedure + 手順 - Open a page that is designed to adjust container sizes as text size changes. - Increase the text size up to 200% using the browser's text size adjustment (not the zoom feature). - Examine the text to ensure the text container size is adjusted to accommodate the size of the text. - Ensure that no text is "clipped" or has disappeared as a result of the increase in text size. + テキストサイズの変更とともにテキストコンテナのサイズを調整するように設計されているページを開く。 + ブラウザのテキストサイズ調節を使って 200% のサイズまで大きくする。(ズーム機能は使用しない) + テキストコンテナのサイズがテキストサイズに合わせて調整されることを確認する。 + テキストサイズを大きくした結果、どのテキストも「切り取られ」たり、見えなくなっていたりしないことを確認する。 - Expected Results + 期待される結果 - Checks #3 and #4 are true. + チェック 3 及び 4 が真である。 @@ -210,15 +204,13 @@ Expected Results - Help improve this page + このページを改善する - Please share your ideas, suggestions, or comments via e-mail to the publicly-archived list public-agwg-comments@w3.org or via GitHub + あなたのアイデア、提案、又はコメントを、Google フォーム 又は GitHub で共有してください。 - E-mail - Fork & Edit on GitHub - New GitHub Issue - + 翻訳に関するお問い合わせ (Google フォーム) + GitHub @@ -239,12 +231,15 @@ Help improve this page WAI-Guide project, co-funded by the European Commission. + この文書は、2025 年 5 月 21 日付けの Techniques for WCAG 2.2 を、ウェブアクセシビリティ基盤委員会 (WAIC) の翻訳ワーキンググループが翻訳して公開しているものです。この文書の正式版は、W3C のサイトにある英語版です。正確な内容については、W3C が公開している原文 (英語) をご確認ください。この翻訳文書は作業進行中です。また、あくまで参考情報であり、翻訳上の誤りが含まれていることがあります。 + + この翻訳文書の利用条件については、WAICが提供する翻訳文書のライセンスをご覧ください。
Please share your ideas, suggestions, or comments via e-mail to the publicly-archived list public-agwg-comments@w3.org or via GitHub
あなたのアイデア、提案、又はコメントを、Google フォーム 又は GitHub で共有してください。
この文書は、2025 年 5 月 21 日付けの Techniques for WCAG 2.2 を、ウェブアクセシビリティ基盤委員会 (WAIC) の翻訳ワーキンググループが翻訳して公開しているものです。この文書の正式版は、W3C のサイトにある英語版です。正確な内容については、W3C が公開している原文 (英語) をご確認ください。この翻訳文書は作業進行中です。また、あくまで参考情報であり、翻訳上の誤りが含まれていることがあります。 +
この翻訳文書の利用条件については、WAICが提供する翻訳文書のライセンスをご覧ください。