Skip to content

Commit

Permalink
normalize “an empty string” to “the empty string” (#2163)
Browse files Browse the repository at this point in the history
Related to w3c/html-aam#514

This normalizes all instances of “_**an** empty string_” to “_**the** empty string_”.

I’ve opened an equivalent HTML-AAM PR in w3c/html-aam#544.

I checked accname and confirmed that it already uses “_the empty string_” consistently throughout.
  • Loading branch information
adampage authored Apr 18, 2024
1 parent 4d774f3 commit 264a2b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10951,7 +10951,7 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
<sdef>aria-current</sdef>
<div class="state-description">
<p><a>Indicates</a> the <a>element</a> that represents the current item within a container or set of related elements.</p>
<p>The <sref>aria-current</sref> <a>attribute</a> is a token type. Any value not included in the list of allowed values SHOULD be treated by <a>assistive technologies</a> as if the value <code>true</code> had been provided. If the attribute is not present or its value is an empty string or <code>undefined</code>, the default value of <code>false</code> applies and the <sref>aria-current</sref> <a>state</a> MUST NOT be exposed by user agents or assistive technologies.</p>
<p>The <sref>aria-current</sref> <a>attribute</a> is a token type. Any value not included in the list of allowed values SHOULD be treated by <a>assistive technologies</a> as if the value <code>true</code> had been provided. If the attribute is not present or its value is the empty string or <code>undefined</code>, the default value of <code>false</code> applies and the <sref>aria-current</sref> <a>state</a> MUST NOT be exposed by user agents or assistive technologies.</p>
<p>The <sref>aria-current</sref> attribute is used when an element within a set of related elements is visually styled to indicate it is the current item in the set. For example:</p>
<ul>
<li>A <code>page</code> token used to indicate a page within a set of pages, where the element is visually styled to represent the current page.</li>
Expand Down Expand Up @@ -11521,7 +11521,7 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
<p><a>Indicates</a> the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an <a>element</a>.</p>
<p>A popup element usually appears as a block of content that is on top of other content. Authors MUST ensure that the role of the element that serves as the container for the popup content is <rref>menu</rref>, <rref>listbox</rref>, <rref>tree</rref>, <rref>grid</rref>, or <rref>dialog</rref>, and that the value of <code>aria-haspopup</code> matches the role of the popup container.</p>
<p>For the popup element to be keyboard accessible, authors SHOULD ensure that the element that can trigger the popup is focusable, that there is a keyboard mechanism for opening the popup, and that the popup element manages focus of all its descendants as described in <a href="#managingfocus">Managing Focus</a>.</p>
<p>The <code>aria-haspopup</code> property is a token type. [=User agents=] MUST treat any value of <code>aria-haspopup</code> that is not included in the list of allowed values, including an empty string, as if the value <code>false</code> had been provided. To provide backward compatibility with ARIA 1.0 content, user agents MUST treat an <code>aria-haspopup</code> value of <code>true</code> as equivalent to a value of <code>menu</code>.</p>
<p>The <code>aria-haspopup</code> property is a token type. [=User agents=] MUST treat any value of <code>aria-haspopup</code> that is not included in the list of allowed values, including the empty string, as if the value <code>false</code> had been provided. To provide backward compatibility with ARIA 1.0 content, user agents MUST treat an <code>aria-haspopup</code> value of <code>true</code> as equivalent to a value of <code>menu</code>.</p>
<p><a>Assistive technologies</a> and user agents SHOULD NOT expose the <code>aria-haspopup</code> property if it has a value of <code>false</code>.</p>
<p class="note">A <rref>tooltip</rref> is not considered to be a popup in this context.</p>
<p class="note"><code>aria-haspopup</code> is most relevant to use when there is a visual indicator in the element that triggers the popup.
Expand Down Expand Up @@ -11666,7 +11666,7 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2>
<p><a>Indicates</a> the entered value does not conform to the format expected by the application. See related <pref>aria-errormessage</pref>.</p>
<p>If the value is computed to be invalid or out-of-range, the application author SHOULD set this <a>attribute</a> to <code>true</code>. [=user agents=] SHOULD inform the user of the error. Application authors SHOULD provide suggestions for corrections if they are known.</p>
<p>When the user attempts to submit data involving a field for which <pref>aria-required</pref> is <code>true</code>, authors MAY use the <sref>aria-invalid</sref> attribute to signal there is an error. However, if the user has not attempted to submit the form, authors SHOULD NOT set the <sref>aria-invalid</sref> attribute on required <a>widgets</a> simply because the user has not yet entered data.</p>
<p>For future expansion, the <sref>aria-invalid</sref> attribute is a token type. Any value not recognized in the list of allowed <span>values</span> MUST be treated by user agents as if the value <code>true</code> had been provided. If the attribute is not present, or its value is <code>false</code>, or its value is an empty string, the default value of <code>false</code> applies.</p>
<p>For future expansion, the <sref>aria-invalid</sref> attribute is a token type. Any value not recognized in the list of allowed <span>values</span> MUST be treated by user agents as if the value <code>true</code> had been provided. If the attribute is not present, or its value is <code>false</code>, or its value is the empty string, the default value of <code>false</code> applies.</p>
<p class="note">This state is being deprecated as a global state in ARIA 1.2. In future versions it will only be allowed on roles where it is specifically supported.</p>
</div>
<table class="state-features">
Expand Down Expand Up @@ -13318,7 +13318,7 @@ <h3>State and Property Attributes</h3>
</ul>
<p> Host languages that support <cite><a href="https://www.w3.org/TR/2006/REC-xml-names-20060816/">XML Namespaces</a></cite> [[XML-NAMES]] <strong>MAY</strong> require that <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> attributes be used with a namespace. In this case, the namespace for <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> state and property attributes <strong>MUST</strong> be <code>http://www.w3.org/ns/wai-aria/</code>. To use <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> in host languages that do not explicitly describe support for it, authors <strong>SHOULD</strong> use this namespace as well, if the host language supports namespaces and there is expectation that user agents will recognize the <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> namespace. The namespace prefix is not defined by this specification but generally is expected to be &quot;<code>aria</code>&quot;. </p>
<p class="note">The <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> state and property attributes have a naming convention such that they all begin with the string &quot;<code>aria-</code>&quot;. This is <em>not</em> a namespace prefix, it is a part of the state or property name. Therefore, when using <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> states and properties with namespace prefixes, the complete attribute name will be like &quot;<code>aria:aria-foo</code>&quot;.</p>
<p>Some host languages do not use namespaces with <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> state and property attributes, either because the host language does not support namespaces or because the designers wish to incorporate <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> into the core feature set. In these host languages, the namespace name for these attributes has no value. The names of these attributes do not have a prefix offset by a colon; in the terms of namespaces they are unprefixed attribute names. The ECMAScript binding of the <abbr title="Document Object Model">DOM</abbr> interface <code>getAttributeNS</code> for example, treats an empty string (<code>&quot;&quot;</code>) as representing this condition, so that both <code>getAttribute(&quot;aria-busy&quot;)</code> and <code>getAttributeNS(&quot;&quot;, &quot;aria-busy&quot;)</code> access the same <sref>aria-busy</sref> attribute in the <abbr title="Document Object Model">DOM</abbr>.</p>
<p>Some host languages do not use namespaces with <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> state and property attributes, either because the host language does not support namespaces or because the designers wish to incorporate <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> into the core feature set. In these host languages, the namespace name for these attributes has no value. The names of these attributes do not have a prefix offset by a colon; in the terms of namespaces they are unprefixed attribute names. The ECMAScript binding of the <abbr title="Document Object Model">DOM</abbr> interface <code>getAttributeNS</code> for example, treats the empty string (<code>&quot;&quot;</code>) as representing this condition, so that both <code>getAttribute(&quot;aria-busy&quot;)</code> and <code>getAttributeNS(&quot;&quot;, &quot;aria-busy&quot;)</code> access the same <sref>aria-busy</sref> attribute in the <abbr title="Document Object Model">DOM</abbr>.</p>
<p class="note">According to the requirements of this section, some user agents recognize <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> state and property attributes <em>with</em> namespaces, some <em>without</em> namespaces, and some might recognize both. Authors are advised to be aware of which form is supported for the host language they are using. Unless the host language and supporting user agents explicitly indicate that the namespace is required, authors are advised to use the attribute without namespaces. Even user agents that support namespaces generally do not publish namespaced <abbr title="Accessible Rich Internet Applications">WAI-ARIA</abbr> states and properties to accessibility APIs. In particular, current implementations of HTML, including XHTML, do not support this namespace.</p>
</section>
<section id="host_general_focus">
Expand Down

0 comments on commit 264a2b5

Please sign in to comment.