Skip to content

Commit 04c61fb

Browse files
committed
DOC-3147: Update accessibility documentation: Adjust alt text length limit to 150 characters, enhance descriptions for decorative images, and clarify filtering behavior for empty alt attributes.
1 parent 9b5dea1 commit 04c61fb

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

modules/ROOT/pages/8.0-release-notes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ The {productname} {release-version} introduces four new image accessibility rule
133133
* *xref:a11ychecker.adoc#I1[I1: Mixed Signals & Decorative Policy]*: Flags images with conflicting accessibility indicators (e.g., `alt` with `role="presentation"`) and ensures decorative images comply with best practices.
134134
* *xref:a11ychecker.adoc#I2[I2: Alt Attribute Requirement]*: Enforces the presence of the `alt` attribute on all `<img>` elements, regardless of other labeling mechanisms like `aria-label`, `aria-labelledby`, or `title`.
135135
* *xref:a11ychecker.adoc#I3[I3: Filename Detection]*: Warns when `alt` text appears to be a filename (e.g., `image123.jpg`), including cases with URL encoding.
136-
* *xref:a11ychecker.adoc#I4[I4: Alt Text Length]*: Detects `alt` text that exceeds a configurable maximum length, promoting concise descriptions. The default limit is 100 characters and can be adjusted using the new xref:a11ychecker.adoc#a11ychecker_alt_text_max_length[`a11ychecker_alt_text_max_length`] setting.
136+
* *xref:a11ychecker.adoc#I4[I4: Alt Text Length]*: Detects `alt` text that exceeds a configurable maximum length, promoting concise descriptions. The default limit is 150 characters and can be adjusted using the new xref:a11ychecker.adoc#a11ychecker_alt_text_max_length[`a11ychecker_alt_text_max_length`] setting.
137137

138138
Additional improvements include a rule precedence system to avoid duplicate violations, centralized image intent detection (e.g., decorative, informative, mixed signals, incomplete), and more readable user-facing messages. Technical terminology such as "alternative text" has been replaced with "text description," and repair instructions are now more contextual and user-friendly.
139139

modules/ROOT/partials/a11y-rules/i3.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ https://www.w3.org/TR/WCAG21/#conformance[WCAG level]:: Level A ; Level AA ; Lev
1111

1212
xref:a11ychecker_html_version[HTML version]:: HTML4 and HTML5
1313

14-
WCAG 2.1 specification:: https://www.w3.org/WAI/WCAG21/Techniques/general/G95.html[G95 - Providing short text alternatives that provide a brief description of the non-text content].
14+
WCAG 2.1 specification::
15+
* https://www.w3.org/WAI/WCAG21/Techniques/general/G95.html[G95 - Providing short text alternatives that provide a brief description of the non-text content].
16+
* https://www.w3.org/WAI/WCAG21/Techniques/failures/F38.html[F38 - Using an empty alt attribute on an image that has a text alternative in another attribute].
1517

1618
include::partial$misc/admon-accessibility-rule-i3-can-also-be-applied.adoc[]
1719

modules/ROOT/partials/configuration/a11y_advanced_options.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Setting `+a11y_advanced_options+` to `+true+`:
1111

1212
* Adds the *Image is decorative* option to the _Insert/Edit Image_ dialog, allowing users to specify that an image is decorative and does not require alternative text for accessibility purposes.
1313
* Adds the *Decorative image* button to Image Optimizer's _Alt text_ context toolbar, allowing users to specify that an image is decorative and does not require alternative text for accessibility purposes.
14-
* Adds the *Image is decorative* option to the _Accessibility Checker error_ dialog for images without alternative text or the `+role="presentation"+` attribute.
14+
* Adds the *Image is decorative* option to the _Accessibility Checker error_ dialog for images that need to be marked as decorative.
1515

1616
[IMPORTANT]
1717
====

modules/ROOT/partials/configuration/a11ychecker_allow_decorative_images.adoc

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33

44
This option determines whether the Accessibility Checker should allow decorative images. Decorative images are those that are used purely for visual enhancement and do not convey meaningful content or serve a specific function.
55

6-
When this option is set to `+true+`, decorative images must have *both*:
6+
When this option is set to `+true+`, decorative images must be marked using one or both of these methods:
77

8-
* An empty alternative text attribute (`+alt=""+`).
9-
* and the `+role="presentation"+` attribute.
8+
* An empty alternative text attribute (`+alt=""+`), OR
9+
* The `+role="presentation"+` or `+role="none"+` attribute, OR
10+
* Both methods together
1011

11-
This combination explicitly tells assistive technologies to ignore these images, improving the browsing experience for users of screen readers.
12+
Any of these approaches explicitly tells assistive technologies to ignore these images, improving the browsing experience for users of screen readers.
1213

1314
=== Common Use Cases for Decorative Images
1415

@@ -18,11 +19,18 @@ This combination explicitly tells assistive technologies to ignore these images,
1819
* Images that are described by adjacent text content
1920
* Spacer images used for layout purposes
2021

21-
=== Example of a Decorative Image:
22+
=== Examples of Decorative Images:
2223

2324
[source,html]
2425
----
25-
<img src="decorative-border.png" role="presentation" alt="" />
26+
<!-- Using empty alt attribute -->
27+
<img src="decorative-border.png" alt="" />
28+
29+
<!-- Using role="presentation" -->
30+
<img src="spacer.gif" role="presentation" />
31+
32+
<!-- Using both approaches -->
33+
<img src="pattern.png" role="presentation" alt="" />
2634
----
2735

2836
=== Example of an Informative Image (non-decorative):
@@ -36,10 +44,8 @@ This combination explicitly tells assistive technologies to ignore these images,
3644

3745
If `+a11ychecker_allow_decorative_images+` is set to `+true+`, the Accessibility Checker will present an error when:
3846

39-
* An image does not have the alternative text attribute (`+alt+`).
40-
* An image has an empty alternative text attribute but is missing the `+role="presentation"+` attribute.
41-
* An image has alternative text and a conflicting `+role="presentation"+` attribute.
42-
* A potentially meaningful image (like a logo or chart) is marked as decorative.
47+
* An image has conflicting accessibility information (e.g., both meaningful alt text and `+role="presentation"+`).
48+
* An image has incomplete accessibility information (no clear decorative or informative intent).
4349

4450
If `+a11ychecker_allow_decorative_images+` is set to `+false+`, the Accessibility Checker will present an error when:
4551

@@ -54,7 +60,7 @@ If `+a11ychecker_allow_decorative_images+` is not explicitly set, the value defi
5460

5561
*Type:* `+Boolean+`
5662

57-
*Default value:* `+true+`
63+
*Default value:* `+false+`
5864

5965
*Possible values:* `+true+`, `+false+`
6066

modules/ROOT/partials/configuration/a11ychecker_filter_issue.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ tinymce.init({
4747

4848
=== Example: using `+a11ychecker_filter_issue+` to filter images with empty alternative text from the Accessibility Checker I1 rule
4949

50-
The callback function in the following example will only return `false` for any issues with `'I1'` as the `+'id'+` image elements with an empty `+'alt+'` attribute, otherwise the issue wont be filtered out. This implementation can be useful as allowing images to have empty alternative text can be another method of applying the `+role="presentation"+` attribute to mark an image as `+decorative+`.
50+
The callback function in the following example will only return `false` for any issues with `'I1'` as the `+'id'+` for image elements with an empty `+'alt+'` attribute, otherwise the issue won't be filtered out. This implementation can be useful when you want to allow images with empty alternative text to be treated as decorative.
5151

5252
[source,js]
5353
----

0 commit comments

Comments
 (0)