You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by br...@apache.org on 2019/08/31 18:53:18 UTC

[jspwiki] branch master updated: 2.11.0-M5-git-15: Improve UI accessibility (ref. sonarcloud report)

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

brushed pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git


The following commit(s) were added to refs/heads/master by this push:
     new b2fcbc0  2.11.0-M5-git-15: Improve UI accessibility (ref. sonarcloud report)
b2fcbc0 is described below

commit b2fcbc0f69f2e966bf7069c290ae2ac06b6e25f7
Author: brushed <di...@gmail.com>
AuthorDate: Sat Aug 31 20:53:03 2019 +0200

    2.11.0-M5-git-15: Improve UI accessibility (ref. sonarcloud report)
---
 ChangeLog                                                 |  6 ++++++
 jspwiki-main/src/main/java/org/apache/wiki/Release.java   |  2 +-
 jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp |  4 ++--
 .../src/main/webapp/templates/210/WorkflowContent.jsp     | 14 +++++---------
 .../src/main/webapp/templates/210/editors/wysiwyg.jsp     |  2 +-
 .../src/main/webapp/templates/default/AJAXSearch.jsp      |  4 ++--
 .../src/main/webapp/templates/default/AttachmentTab.jsp   |  3 ++-
 .../src/main/webapp/templates/default/GroupTab.jsp        |  4 +++-
 .../src/main/webapp/templates/default/InfoContent.jsp     |  9 +++++----
 .../src/main/webapp/templates/default/PreferencesTab.jsp  |  6 ++++--
 .../src/main/webapp/templates/default/WorkflowContent.jsp |  8 ++++----
 .../webapp/templates/default/admin/UserManagement.jsp     | 15 ++++++++-------
 12 files changed, 43 insertions(+), 34 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b03769d..3feef2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-31-08  Dirk Frederickx (brushed AT apache DOT org)
+
+       * 2.11.0-M5-git-15
+
+       * Improve UI accessibility (ref. sonarcloud report)
+
 2019-27-08  Dirk Frederickx (brushed AT apache DOT org)
 
        * 2.11.0-M5-git-14
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/Release.java b/jspwiki-main/src/main/java/org/apache/wiki/Release.java
index 709ac35..d034007 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/Release.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/Release.java
@@ -72,7 +72,7 @@ public final class Release {
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "14";
+    public static final String     BUILD         = "15";
 
     /**
      *  This is the generic version string you should use when printing out the version.  It is of
diff --git a/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp b/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp
index 1e82600..2797207 100644
--- a/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/InfoContent.jsp
@@ -207,7 +207,7 @@
         <th scope="col"><fmt:message key="info.size"/></th>
         <th scope="col"><fmt:message key="info.author"/></th>
         <th scope="col"><fmt:message key="info.changes"/></th>
-        <th class='changenote'><fmt:message key="info.changenote"/></th>
+        <th class="changenote" scope="col"><fmt:message key="info.changenote"/></th>
       </tr>
 
       <wiki:HistoryIterator id="currentPage">
@@ -354,7 +354,7 @@
          <th scope="col"><fmt:message key="info.actions"/></th>
       </wiki:Permission>
       --%>
-      <th  class='changenote'><fmt:message key="info.changenote"/></th>
+      <th  class="changenote" scope="col"><fmt:message key="info.changenote"/></th>
     </tr>
 
     <wiki:HistoryIterator id="att"><%-- <wiki:AttachmentsIterator id="att"> --%>
diff --git a/jspwiki-war/src/main/webapp/templates/210/WorkflowContent.jsp b/jspwiki-war/src/main/webapp/templates/210/WorkflowContent.jsp
index a8eb7be..e0d4082 100644
--- a/jspwiki-war/src/main/webapp/templates/210/WorkflowContent.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/WorkflowContent.jsp
@@ -56,10 +56,8 @@
 </c:if>
 
 <c:if test="${!empty decisions}">
-  <div class="formhelp">
-    <fmt:message key="workflow.actor.instructions"/>
-  </div>
-  <table class="wikitable">
+  <p id="workflow-owner-instructions"><fmt:message key="workflow.owner.instructions"/></p>
+  <table class="wikitable" aria-describedby="workflow-actor-instructions">
     <thead>
       <th scope="col" width="5%"  align="center"><fmt:message key="workflow.id"/></th>
       <th scope="col" width="45%" align="left"><fmt:message key="workflow.item"/></th>
@@ -129,7 +127,7 @@
 </c:if>
 
 <!-- Running workflows for which current user is the owner -->
-<h4><fmt:message key="workflow.workflows.heading" /></h4>
+<h4 id="workflows"><fmt:message key="workflow.workflows.heading" /></h4>
 
 <c:if test="${empty workflows}">
   <div class="information">
@@ -138,10 +136,8 @@
 </c:if>
 
 <c:if test="${!empty workflows}">
-  <div class="formhelp">
-    <fmt:message key="workflow.owner.instructions"/>
-  </div>
-  <table class="wikitable">
+  <p id="workflow-owner-instructions"><fmt:message key="workflow.owner.instructions"/></p>
+  <table class="wikitable" aria-describedby="workflow-owner-instructions">
     <thead>
       <th scope="col" width="5%"  align="center"><fmt:message key="workflow.id"/></th>
       <th scope="col" width="45%" align="left"><fmt:message key="workflow.item"/></th>
diff --git a/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp b/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp
index 05d413d..4893ba2 100644
--- a/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp
+++ b/jspwiki-war/src/main/webapp/templates/210/editors/wysiwyg.jsp
@@ -125,7 +125,7 @@ Falling back to the plain editor.
     </wiki:Permission>
 --%>
     <tr>
-    <td><label for="changenote"><fmt:message key='editor.plain.changenote'/></label></td>
+    <th scope="row"><label for="changenote"><fmt:message key='editor.plain.changenote'/></label></th>
     <td><input type="text" name="changenote" id="changenote" size="80" maxlength="80" value="${changenote}"/></td>
 
     </tr>
diff --git a/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp b/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
index e9d010e..56c4ad1 100644
--- a/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/AJAXSearch.jsp
@@ -105,7 +105,7 @@
 
 <wiki:SearchResults>
 
-  <h4><fmt:message key="find.heading.results"><fmt:param><c:out value="${param.query}"/></fmt:param></fmt:message></h4>
+  <h4 id="find-heading-results"><fmt:message key="find.heading.results"><fmt:param><c:out value="${param.query}"/></fmt:param></fmt:message></h4>
 
   <p>
   <fmt:message key="find.externalsearch"/>
@@ -126,7 +126,7 @@
 
     <div class="graphBars">
     <div class="zebra-table">
-    <table class="wikitable  table-striped" >
+    <table class="wikitable  table-striped" aria-describedby="find-heading-results">
 
       <tr>
          <th scope="col"><fmt:message key="find.results.page"/></th>
diff --git a/jspwiki-war/src/main/webapp/templates/default/AttachmentTab.jsp b/jspwiki-war/src/main/webapp/templates/default/AttachmentTab.jsp
index 5e77cf4..20ddf24 100644
--- a/jspwiki-war/src/main/webapp/templates/default/AttachmentTab.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/AttachmentTab.jsp
@@ -101,8 +101,9 @@
     </form>
   </wiki:Permission>
 
+  <h4 id="attach-list"><fmt:message key='attach.list'/></h4>
   <div class="slimbox-attachments table-filter-striped-sort-condensed">
-  <table class="table">
+  <table class="table" aria-describedby="attach-list">
     <tr>
       <th scope="col"><fmt:message key="info.attachment.name"/></th>
       <th scope="col"><fmt:message key="info.version"/></th>
diff --git a/jspwiki-war/src/main/webapp/templates/default/GroupTab.jsp b/jspwiki-war/src/main/webapp/templates/default/GroupTab.jsp
index a935fa3..98bf0fb 100644
--- a/jspwiki-war/src/main/webapp/templates/default/GroupTab.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/GroupTab.jsp
@@ -107,8 +107,10 @@
   <div class="modal"><fmt:message key='grp.deletegroup.confirm'/></div>
 </form>
 
+<h4 id="allgroups"><fmt:message key='grp.allgroups'/></h4>
 <div class="table-filter-sort-condensed-striped">
-  <table class="table">
+  <table class="table" aria-described-by="allgroups">
+    <caption class="hide">Group Details</caption>
     <thead>
       <th scope="col"><fmt:message key="group.name"/></th>
       <th scope="col"><fmt:message key="group.members"/></th>
diff --git a/jspwiki-war/src/main/webapp/templates/default/InfoContent.jsp b/jspwiki-war/src/main/webapp/templates/default/InfoContent.jsp
index 42a2454..ef39366 100644
--- a/jspwiki-war/src/main/webapp/templates/default/InfoContent.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/InfoContent.jsp
@@ -161,7 +161,7 @@
     <c:set var="last" value="<%= startitem + pagesize %>"/>
 
     <div class="table-filter-sort-condensed-striped">
-    <table class="table" >
+    <table class="table" aria-describedby="history">
       <tr>
         <th scope="col"><fmt:message key="info.version"/></th>
         <th scope="col"><fmt:message key="info.date"/></th>
@@ -213,7 +213,7 @@
     ${pagination}
 
     <h4 id="page-refs"><fmt:message key="info.tab.links" /></h4>
-    <table class="table">
+    <table class="table" aria-describedby="page-refs">
       <tr>
       <th scope="col"><fmt:message key="info.tab.incoming" /></th>
       <th scope="col"><fmt:message key="info.tab.outgoing" /></th>
@@ -316,10 +316,11 @@
   </wiki:Permission>
 </form>
 
+
 <%-- TODO why no pagination here - number of attach versions of one page limited ?--%>
-<%--<h4><fmt:message key='info.attachment.history' /></h4>--%>
+  <h4 id="info-attachment-history"><fmt:message key='info.attachment.history' /></h4>
   <div class="slimbox-attachments table-filter-sort-condensed-striped">
-  <table class="table">
+  <table class="table" aria-describedby="info-attachment-history">
     <tr>
       <th scope="col"><fmt:message key="info.attachment.name"/></th>
       <th scope="col"><fmt:message key="info.version"/></th>
diff --git a/jspwiki-war/src/main/webapp/templates/default/PreferencesTab.jsp b/jspwiki-war/src/main/webapp/templates/default/PreferencesTab.jsp
index dadc433..0612f5b 100644
--- a/jspwiki-war/src/main/webapp/templates/default/PreferencesTab.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/PreferencesTab.jsp
@@ -211,8 +211,10 @@
   <hr />
 
   <div class="form-group table-striped-bordered-condensed-fit-sort">
-    <label class="control-label form-col-20" style="vertical-align:top;"><fmt:message key="prefs.user.pagecookies"/></label>
-    <table class="wikitable" style="display:inline-block;">
+    <label id="pref-user-pagecookies" class="control-label form-col-20" style="vertical-align:top;">
+      <fmt:message key="prefs.user.pagecookies"/>
+    </label>
+    <table class="wikitable" style="display:inline-block;" aria-describedby="pref-user-pagecookies">
     <tr>
       <th scope="col"><fmt:message key="prefs.user.pagecookies.type"/></th>
       <th scope="col"><fmt:message key="prefs.user.pagecookies.page"/></th>
diff --git a/jspwiki-war/src/main/webapp/templates/default/WorkflowContent.jsp b/jspwiki-war/src/main/webapp/templates/default/WorkflowContent.jsp
index 1ed3c8a..f2dbcf9 100644
--- a/jspwiki-war/src/main/webapp/templates/default/WorkflowContent.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/WorkflowContent.jsp
@@ -45,9 +45,9 @@
 
 <c:if test="${!empty decisions}">
 
-  <p><fmt:message key="workflow.actor.instructions"/></p>
+  <p id="workflow-actor-instructions"><fmt:message key="workflow.actor.instructions"/></p>
 
-  <table class="table table-striped table-condensed">
+  <table class="table table-striped table-condensed" aria-describedby="workflow-actor-instructions">
     <thead><%-- 5/45/15/15/20--%>
       <th scope="col"><fmt:message key="workflow.id"/></th>
       <th scope="col"><fmt:message key="workflow.item"/></th>
@@ -125,9 +125,9 @@
 
 <c:if test="${!empty workflows}">
 
-  <p><fmt:message key="workflow.owner.instructions"/></p>
+  <p id="workflow-owner-instructions"><fmt:message key="workflow.owner.instructions"/></p>
 
-  <table class="table">
+  <table class="table" aria-describedby="workflow-owner-instructions">
     <thead>
       <th scope="col"><fmt:message key="workflow.id"/></th>
       <th scope="col"><fmt:message key="workflow.item"/></th>
diff --git a/jspwiki-war/src/main/webapp/templates/default/admin/UserManagement.jsp b/jspwiki-war/src/main/webapp/templates/default/admin/UserManagement.jsp
index a917f4c..02731b8 100644
--- a/jspwiki-war/src/main/webapp/templates/default/admin/UserManagement.jsp
+++ b/jspwiki-war/src/main/webapp/templates/default/admin/UserManagement.jsp
@@ -79,34 +79,35 @@ function addNew()
      <input type="hidden" name='bean' value='org.apache.wiki.ui.admin.beans.UserBean'/>
      <input type="hidden" id="loginid" name="loginid" value="" />
      <table>
+     <caption class="hide">User Details form</caption>
      <tr>
-       <td><label for="loginname">Login name</label></td>
+       <th scope="row"><label for="loginname">Login name</label></th>
        <td>
            <input type="text" name="loginname" id="loginname"
                   size="20" value="" />
        </td>
      </tr>
      <tr>
-       <td><label for="password">Password </label></td>
+       <th scope="row"><label for="password">Password </label></th>
        <td>
           <input type="password" name="password" id="password" size="20" value="" />
        </td>
      </tr>
      <tr>
-       <td><label for="password2">Confirm password</label></td>
+       <th scope="row"><label for="password2">Confirm password</label></th>
        <td>
          <input type="password" name="password2" id="password2" size="20" value="" />
        </td>
      </tr>
      <tr>
-       <td><label for="fullname">Full name</label></td>
+       <th scope="row"><label for="fullname">Full name</label></th>
        <td>
          <input type="text" name="fullname" id="fullname"
                 size="20" value="" />
        </td>
      </tr>
      <tr>
-       <td><label for="email">Email</label></td>
+       <th scope="row"><label for="email">Email</label></th>
        <td>
          <input type="text" name="email" id="email"
                 size="20" value="" />
@@ -114,12 +115,12 @@ function addNew()
      </tr>
 
      <tr class="additinfo">
-       <td><label>Creation date</label></td>
+       <th scope="row"><label>Creation date</label></th>
        <td class="formvalue" id="creationdate">
        </td>
      </tr>
      <tr class="additinfo">
-       <td><label>Last modified</label></td>
+       <th scope="row"><label>Last modified</label></th>
        <td class="formvalue" id="lastmodified">
        </td>
      </tr>