Skip to content
Open
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12062,6 +12062,20 @@ <h2>Translatable Attributes</h2>
<li><pref>aria-rowindextext</pref></li>
<li><pref>aria-valuetext</pref></li>
</ul>
<p>
The web platform does not provide a mechanism to specify language and directionality for a translatable attribute separate from the language and directionality of its containing element. This includes <pref>aria-labelledby</pref> and <pref>aria-describedby</pref> because the <a href="" class="accname">Accessible Name and Description Computation</a> [[ACCNAME-1.2]] results in a flat string.
</p>
<p>
It is best practice for authors to ensure that the language and directionality of the value of a translatable attribute matches the language and directionality of its containing element.
</p>
<p>
Where language or direction metadata for the translatable attribute value needs to differ from that of its containing element, authors can use a referencing attribute, such as <code>aria-labelledby</code>, <code>aria-describedby</code>, or <code>aria-details</code>, pointing to an element, on which language and direction attributes can be expressed directly. This allows translation of these values when the user agent is presenting the document in a machine-translated rendering, via a built-in "Translate this page" feature, as well as appropriate rendering when the element's contents are rendered visually.

Authors are encouraged to avoid using plain text ARIA attribute values for text alternatives that contain inline language/direction changes or other text-level markup.
</p>
<p>
For more details, see <a class="informative" href="https://www.w3.org/TR/international-specs#markup_elements_attributes">Internationalization best practices for web developers</a>.
</p>
</section>
<section id="global_states">
<h2><dfn>Global</dfn> States and Properties</h2>
Expand Down
Loading