You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by th...@apache.org on 2020/07/04 19:24:36 UTC

[tapestry-5] 02/02: TAP5-2631: Make forms more accessible with WAI-ARIA attributes

This is an automated email from the ASF dual-hosted git repository.

thiagohp pushed a commit to branch java9modules
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git

commit b274c53bc55a1bb1cfde8eec5bd6bcbfaf34a7e6
Author: Thiago H. de Paula Figueiredo <th...@arsmachina.com.br>
AuthorDate: Sat Jul 4 16:22:15 2020 -0300

    TAP5-2631: Make forms more accessible with WAI-ARIA attributes
---
 .../src/main/java/org/apache/tapestry5/validator/Required.java          | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Required.java b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Required.java
index ee76388..2d6be67 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Required.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Required.java
@@ -61,6 +61,8 @@ public final class Required extends AbstractValidator<Void, Object>
                        FormSupport formSupport)
     {
 
+        writer.attributes("aria-required", "true");
+        
         if (formSupport.isClientValidationEnabled())
         {
             javaScriptSupport.require("t5/core/validation");