This issue has been created
There is 1 update, 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-c4a1a14f-1c03-4599-adeb-627b40f2f1a7 XWIKI-22448 Open

Batch id link for document restoration does not have any text

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-c9fcad54-08b2-414c-b633-1b2da5e4b1d7 Charpentier Lucas created this issue on 26/Aug/24 11:49
 
Summary: Batch id link for document restoration does not have any text
Issue Type: cid:jira-generated-image-avatar-c4a1a14f-1c03-4599-adeb-627b40f2f1a7 Bug
Affects Versions: 16.6.0
Assignee: Unassigned
Components: Web - Templates & Resources
Created: 26/Aug/24 11:49
Labels: usability wcag
Priority: cid:jira-generated-image-static-major-817e5fd6-26e6-4855-b6e3-a4b4b257d6b2 Major
Reporter: Charpentier Lucas
Description:

This issue was first found with automated WCAG tests (build #645 for example):

WCAG fails in the test class [org.xwiki.administration.test.ui.AllIT]:
__________
Validation in the test method [createAndDeleteUser]
Check for [org.xwiki.test.ui.po.ViewPage] at http://xwikiweb:8080/xwiki/bin/view/XWiki/createAndDeleteUser.
Found [1] items

1: Links must have discernible text
Description: Ensures links have discernible text
Help URL: https://dequeuniversity.com/rules/axe/4.9/link-name?application=axeAPI
Help: Links must have discernible text
Impact: serious
Tags: cat.name-role-value, wcag2a, wcag244, wcag412, section508, section508.22.a, TTv5, TT6.a, EN-301-549, EN-9.2.4.4, EN-9.4.1.2, ACT

HTML element:
<a href="/xwiki/bin/undelete/XWiki/createAndDeleteUser?id=49&showBatch=true"></a>
Selector: [td:nth-child(3) > a]
Fix all of the following:
Element is in tab order and does not have accessible text

Fix any of the following:
Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute

__________
Validation in the test method [createAndDeleteUser]
Check for [org.xwiki.test.ui.po.DeletePageOutcomePage] at http://xwikiweb:8080/xwiki/bin/view/XWiki/createAndDeleteUser.
Found [1] items

1: Links must have discernible text
Description: Ensures links have discernible text
Help URL: https://dequeuniversity.com/rules/axe/4.9/link-name?application=axeAPI
Help: Links must have discernible text
Impact: serious
Tags: cat.name-role-value, wcag2a, wcag244, wcag412, section508, section508.22.a, TTv5, TT6.a, EN-301-549, EN-9.2.4.4, EN-9.4.1.2, ACT

HTML element:
<a href="/xwiki/bin/undelete/XWiki/createAndDeleteUser?id=49&showBatch=true"></a>
Selector: [td:nth-child(3) > a]
Fix all of the following:
Element is in tab order and does not have accessible text

Fix any of the following:
Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute

==> expected: <false> but was: <true>

This fail highlights that in some cases, we have links that do not have any text. In most cases, we cannot see those links, so it does not matter much. However it would be an issue for screen readers

 
 

1 update

 
cid:jira-generated-image-avatar-c9fcad54-08b2-414c-b633-1b2da5e4b1d7 Changes by Charpentier Lucas on 26/Aug/24 11:49
 
Assignee: Charpentier Lucas
 
 

2 comments

 
cid:jira-generated-image-avatar-c9fcad54-08b2-414c-b633-1b2da5e4b1d7 Charpentier Lucas on 26/Aug/24 11:50
 

Note that a very similar problem occurs with links generated in the `DeletedDocuments` table.

 
cid:jira-generated-image-avatar-c9fcad54-08b2-414c-b633-1b2da5e4b1d7 Charpentier Lucas on 26/Aug/24 11:54
 

We can see in the source code that those links to the batch have an empty text only when the id of the batch is this empty text. In my opinion, having such a link when we don't have a proper batch id is not correct (probably coded with this intention anyways, but the way it was done does not work the best by today's standards).

 

Refs: https://github.com/xwiki/xwiki-platform/blob/d9e947559077e947315bf700c5703dfc7dd8a8d7/xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/recyclebinlist.vm#L75 and https://github.com/xwiki/xwiki-platform/blob/da03cbe5280879886fd8c27f136d1989a4228b46/xwiki-platform-core/xwiki-platform-index/xwiki-platform-index-ui/src/main/resources/XWiki/DeletedDocuments.xml#L360