Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
moreAccessibility
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SondagesPro-LimeSurvey-plugin
moreAccessibility
Commits
17add477
Commit
17add477
authored
Mar 10, 2018
by
Denis Chenu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] Don't add empty aria-labelledby
parent
6fa5036d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
moreAccessibility.php
moreAccessibility.php
+10
-7
No files found.
moreAccessibility.php
View file @
17add477
...
...
@@ -5,7 +5,7 @@
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2015-2016 Denis Chenu <http://www.sondages.pro>
* @license GPL v3
* @version 1.
4.0
* @version 1.
5.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -96,10 +96,12 @@ class moreAccessibility extends PluginBase
foreach
(
$dom
->
getElementsByTagName
(
'label'
)
as
$label
)
$label
->
parentNode
->
removeChild
(
$label
);
$input
=
$dom
->
getElementById
(
$sAnswerId
);
if
(
$input
)
$input
->
setAttribute
(
"aria-labelledby"
,
implode
(
" "
,
$aLabelledBy
));
else
tracevar
(
"
{
$sAnswerId
}
Is not found in HTML produced for answers"
);
if
(
!
empty
(
$aLabelledBy
))
{
if
(
$input
)
$input
->
setAttribute
(
"aria-labelledby"
,
implode
(
" "
,
$aLabelledBy
));
else
tracevar
(
"
{
$sAnswerId
}
Is not found in HTML produced for answers"
);
}
$newHtml
=
$dom
->
saveHTMLExact
();
$oEvent
->
set
(
'answers'
,
$newHtml
);
}
...
...
@@ -216,7 +218,9 @@ class moreAccessibility extends PluginBase
foreach
(
$dom
->
getElementsByTagName
(
'table'
)
as
$elTable
)
{
$elTable
->
setAttribute
(
'role'
,
'group'
);
$elTable
->
setAttribute
(
'aria-labelledby'
,
implode
(
" "
,
$aGlobalDescribedBy
));
if
(
!
empty
(
$aGlobalDescribedBy
))
{
$elTable
->
setAttribute
(
'aria-labelledby'
,
implode
(
" "
,
$aGlobalDescribedBy
));
}
// Fix update summary ? Add aria-hidden to head ?
}
switch
(
$sType
)
...
...
@@ -267,7 +271,6 @@ class moreAccessibility extends PluginBase
}
}
}
$newHtml
=
$dom
->
saveHTMLExact
();
$oEvent
->
set
(
'answers'
,
$newHtml
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment