You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/05/16 14:23:50 UTC

[sling-org-apache-sling-app-cms] branch master updated: Fixing further accessibility concerns

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

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/master by this push:
     new a1211d1  Fixing further accessibility concerns
a1211d1 is described below

commit a1211d1e910ef6e1117234cf8ecbc6fa95a96dd2
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu May 16 10:23:42 2019 -0400

    Fixing further accessibility concerns
---
 .../components/cms/columns/publish/publish.jsp     | 28 ++++---
 .../components/editor/fields/path/path.jsp         |  6 +-
 .../components/editor/fields/repeating/field.jsp   | 14 +++-
 .../components/editor/fields/richtext/field.jsp    |  2 +-
 .../components/editor/fields/select/field.jsp      |  2 +-
 .../editor/fields/siblingselect/siblingselect.jsp  | 86 +++++++++++-----------
 .../components/editor/fields/taxonomy/field.jsp    |  8 +-
 .../components/editor/fields/text/field.jsp        |  2 +-
 .../components/editor/fields/textarea/field.jsp    |  2 +-
 .../components/editor/slingform/slingform.jsp      |  1 -
 .../libs/sling-cms/components/pages/base/nav.jsp   |  8 +-
 11 files changed, 91 insertions(+), 68 deletions(-)

diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
index af15eb3..c74c4a6 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/columns/publish/publish.jsp
@@ -18,16 +18,20 @@
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
 <td data-value="${sling:getRelativeResource(resource,'jcr:content').valueMap.published ? 0 : 1}">
-	<c:choose>
-		<c:when test="${sling:getRelativeResource(resource,'jcr:content').valueMap.published}">
-			<a class="button is-success is-outlined Fetch-Modal" href="/cms/shared/unpublish.html${resource.path}" title="Content Published" data-title="Unpublish" data-path=".Main-Content form">
-				<i class="jam jam-check"></i>
-			</a>
-		</c:when>
-		<c:otherwise>
-			<a class="button is-warning is-outlined Fetch-Modal" href="/cms/shared/publish.html${resource.path}" title="Content Not Published" data-title="Publish" data-path=".Main-Content form">
-				<i class="jam jam-close"></i>
-			</a>
-		</c:otherwise>
-	</c:choose>
+    <c:choose>
+        <c:when test="${sling:getRelativeResource(resource,'jcr:content').valueMap.published}">
+            <a class="button is-success is-outlined Fetch-Modal" href="/cms/shared/unpublish.html${resource.path}" title="Content Published" data-title="Unpublish" data-path=".Main-Content form">
+                <i class="jam jam-check">
+                    <span class="is-vhidden">Content Published</span>
+                </i>
+            </a>
+        </c:when>
+        <c:otherwise>
+            <a class="button is-warning is-outlined Fetch-Modal" href="/cms/shared/publish.html${resource.path}" title="Content Not Published" data-title="Publish" data-path=".Main-Content form">
+                <i class="jam jam-close">
+                    <span class="is-vhidden">Content Not Published</span>
+                </i>
+            </a>
+        </c:otherwise>
+    </c:choose>
 </td>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/path/path.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/path/path.jsp
index 87a82c3..984323d 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/path/path.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/path/path.jsp
@@ -58,11 +58,13 @@
     <c:when test="${properties.hidesearch != true}">
     	<div class="field has-addons">
           <div class="control is-expanded">
-              <input class="input pathfield" type="text" name="${properties.name}" value="${value}" ${required} ${disabled} data-type="${properties.type}" data-base="${properties.basePath}" autocomplete="off" />
+              <input class="input pathfield" type="text" id="${properties.name}" name="${properties.name}" value="${value}" ${required} ${disabled} data-type="${properties.type}" data-base="${properties.basePath}" autocomplete="off" />
           </div>
           <div class="control">
               <a href="/cms/shared/search.html" class="button Fetch-Modal search-button" data-title="Search" data-path=".Main-Content > *">
-                  <span class="jam jam-search"></span>
+                  <span class="jam jam-search">
+                    <span class="is-vhidden">Search</span>
+                  </span>
               </a>
           </div>
          </div>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/repeating/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/repeating/field.jsp
index 57338a7..b41a72a 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/repeating/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/repeating/field.jsp
@@ -25,7 +25,11 @@
             </div>
             <div class="control">
                 <button class="repeating__remove button">
-                    <span class="jam jam-minus"></span>
+                    <span class="jam jam-minus">
+                        <span class="is-vhidden">
+                            Remove
+                        </span>
+                    </span>
                 </button>
             </div>
         </div>
@@ -38,13 +42,17 @@
                 </div>
                 <div class="control">
                     <button class="repeating__remove button">
-                        <span class="jam jam-minus"></span>
+                        <span class="jam jam-minus">
+                            <span class="is-vhidden">
+                                Remove
+                            </span>
+                        </span>
                     </button>
                 </div>
             </div>
         </c:forEach>
     </div>
-    <button type="button" class="repeating__add button">
+    <button type="button" class="repeating__add button" name="${properties.name}">
         <span class="jam jam-plus"></span>
     </button>
 </div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
index ff77598..3093a1a 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
@@ -27,5 +27,5 @@
         </c:otherwise>
     </c:choose>
     <sling:include resource="${toolbar}" />
-    <textarea class="rte-editor textarea" name="${properties.name}" ${required} ${disabled}>${value}</textarea>
+    <textarea class="rte-editor textarea" id="${properties.name}" name="${properties.name}" ${required} ${disabled}>${value}</textarea>
 </div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/select/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/select/field.jsp
index 9a5cbfd..c677e98 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/select/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/select/field.jsp
@@ -21,7 +21,7 @@
     <c:set var="multiple" value="multiple = \"multiple\"" />
 </c:if>
 <div class="select is-fullwidth">
-    <select name="${properties.name}" ${required} ${disabled} ${multiple}>
+    <select name="${properties.name}" id="${properties.name}" ${required} ${disabled} ${multiple}>
         <c:choose>
             <c:when test="${not empty properties.options}">
                 <c:forEach var="option" items="${properties.options}">
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/siblingselect/siblingselect.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/siblingselect/siblingselect.jsp
index 6a92473..a0a9263 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/siblingselect/siblingselect.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/siblingselect/siblingselect.jsp
@@ -19,47 +19,47 @@
  <%@include file="/libs/sling-cms/global.jsp"%>
 <c:set var="rsrc" value="${sling:getResource(resourceResolver,slingRequest.requestPathInfo.suffix)}" />
 <div class="field">
-	<label for="limit">
-		Order
-	</label>
-	<div class="control">
-		<div class="select is-fullwidth">
-			<select name=":order">
-				<c:forEach var="sibling" items="${sling:listChildren(rsrc.parent)}" varStatus="status">
-					<c:choose>
-						<c:when test="${status.first}">
-							<c:choose>
-								<c:when test="${rsrc.path == sibling.path}">
-									<option value="${status.index}" selected="selected">Current Position</option>
-								</c:when>
-								<c:otherwise>
-									<option value="${status.index}">First</option>
-								</c:otherwise>
-							</c:choose>
-						</c:when>
-						<c:when test="${status.last}">
-							<c:choose>
-								<c:when test="${rsrc.path == sibling.path}">
-									<option value="${status.index}" selected="selected">Current Position</option>
-								</c:when>
-								<c:otherwise>
-									<option value="${status.index}">Last</option>
-								</c:otherwise>
-							</c:choose>
-						</c:when>
-						<c:otherwise>
-							<c:choose>
-								<c:when test="${rsrc.path == sibling.path}">
-									<option value="${status.index}" selected="selected">Current Position</option>
-								</c:when>
-								<c:otherwise>
-									<option value="${status.index}">Before ${sibling.name}</option>
-								</c:otherwise>
-							</c:choose>
-						</c:otherwise>
-					</c:choose>
-				</c:forEach>
-			</select>
-		</div>
-	</div>
+    <label for="order">
+        Order
+    </label>
+    <div class="control">
+        <div class="select is-fullwidth">
+            <select name=":order" id="order">
+                <c:forEach var="sibling" items="${sling:listChildren(rsrc.parent)}" varStatus="status">
+                    <c:choose>
+                        <c:when test="${status.first}">
+                            <c:choose>
+                                <c:when test="${rsrc.path == sibling.path}">
+                                    <option value="${status.index}" selected="selected">Current Position</option>
+                                </c:when>
+                                <c:otherwise>
+                                    <option value="${status.index}">First</option>
+                                </c:otherwise>
+                            </c:choose>
+                        </c:when>
+                        <c:when test="${status.last}">
+                            <c:choose>
+                                <c:when test="${rsrc.path == sibling.path}">
+                                    <option value="${status.index}" selected="selected">Current Position</option>
+                                </c:when>
+                                <c:otherwise>
+                                    <option value="${status.index}">Last</option>
+                                </c:otherwise>
+                            </c:choose>
+                        </c:when>
+                        <c:otherwise>
+                            <c:choose>
+                                <c:when test="${rsrc.path == sibling.path}">
+                                    <option value="${status.index}" selected="selected">Current Position</option>
+                                </c:when>
+                                <c:otherwise>
+                                    <option value="${status.index}">Before ${sibling.name}</option>
+                                </c:otherwise>
+                            </c:choose>
+                        </c:otherwise>
+                    </c:choose>
+                </c:forEach>
+            </select>
+        </div>
+    </div>
 </div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/field.jsp
index 9fc984c..c82bb68 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/taxonomy/field.jsp
@@ -28,11 +28,15 @@
      </fieldset>
     <div class="taxonomy__field field has-addons">
         <div class="control is-expanded">
-             <input class="input" type="text" ${required} ${disabled} list="taxonomy-${fn:replace(resource.name,':','-')}" autocomplete="off" />
+             <input class="input" type="text" ${required} ${disabled} id="${properties.name}" list="taxonomy-${fn:replace(resource.name,':','-')}" autocomplete="off" />
          </div>
          <div class="control">
              <button class="taxonomy__add button">
-                 <span class="jam jam-plus"></span>
+                 <span class="jam jam-plus">
+                    <span class="is-vhidden">
+                        Add
+                    </span>
+                 </span>
              </button>
          </div>
      </div>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/text/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/text/field.jsp
index aee546f..bba9abf 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/text/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/text/field.jsp
@@ -17,4 +17,4 @@
  * under the License.
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
-<input type="${not empty properties.type ? properties.type : 'text'}" class="input" name="${properties.name}" value="${value}" ${required} ${disabled} />
\ No newline at end of file
+<input type="${not empty properties.type ? properties.type : 'text'}" class="input" id="${properties.name}" name="${properties.name}" value="${value}" ${required} ${disabled} />
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/textarea/field.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/textarea/field.jsp
index b20012e..c13b071 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/textarea/field.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/textarea/field.jsp
@@ -17,4 +17,4 @@
  * under the License.
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
-<textarea class="textarea" name="${properties.name}" ${required} ${disabled}>${value}</textarea>
\ No newline at end of file
+<textarea class="textarea" name="${properties.name}" id="${properties.name}" ${required} ${disabled}>${value}</textarea>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/slingform/slingform.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/slingform/slingform.jsp
index 17cb3e0..7a4641c 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/slingform/slingform.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/slingform/slingform.jsp
@@ -17,7 +17,6 @@
  * under the License.
  */ --%>
 <%@include file="/libs/sling-cms/global.jsp"%>
-<h1 class="title">${properties.title}</h1>
 <form method="post"
     action="${slingRequest.requestPathInfo.suffix}${properties.actionSuffix}"
     enctype="multipart/form-data" class="Form-Ajax"
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
index da5e167..36279aa 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/base/nav.jsp
@@ -22,7 +22,13 @@
         <a class="navbar-item" href="http://sling.apache.org" >
             <img src="/static/clientlibs/sling-cms/img/sling-logo.svg" width="100" alt="Apache Sling"/>
         </a>
-        <a href="/cms/start.html" class="navbar-item" title="CMS Home"><span class="icon"><i class="jam jam-home-f"></i></span></a>
+        <a href="/cms/start.html" class="navbar-item" title="CMS Home">
+            <span class="icon">
+                <i class="jam jam-home-f">
+                    <span class="is-vhidden">Home</span>
+                </i>
+            </span>
+        </a>
         <a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="#top-navbar-menu">
           <span aria-hidden="true"></span>
           <span aria-hidden="true"></span>