Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
ui_suite_dsfr
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ui_suite_dsfr
Commits
97a7aeed
Commit
97a7aeed
authored
3 months ago
by
Nicolas N
Committed by
Mikael Meulle
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3461793
by nicocin: Textarea ID incomplete + aria-describedby missing reference
parent
99801607
No related branches found
No related tags found
1 merge request
!101
Ref #3461793 - Fix textarea ID and aria-describedby generation
Pipeline
#326872
passed with warnings
3 months ago
Stage: build
Stage: validate
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui_suite_dsfr.theme
+8
-1
8 additions, 1 deletion
ui_suite_dsfr.theme
with
8 additions
and
1 deletion
ui_suite_dsfr.theme
+
8
−
1
View file @
97a7aeed
...
...
@@ -420,10 +420,17 @@ function ui_suite_dsfr_preprocess_pattern_button(array &$variables) {
function
ui_suite_dsfr_preprocess_textarea
(
array
&
$variables
)
{
if
(
!
empty
(
$variables
[
'element'
][
'#errors'
]))
{
$error_id
=
'error-desc--'
;
if
(
isset
(
$variables
[
'element'
][
'#name'
]))
{
$error_id
.
=
$variables
[
'element'
][
'#name'
];
}
$variables
[
'attributes'
][
'class'
][]
=
'fr-input--error'
;
// Move error to input, so can be used in input template.
$variables
[
'errors'
]
=
$variables
[
'element'
][
'#errors'
];
$variables
[
'attributes'
][
'aria-describedby'
]
=
$error_id
;
$aria_describedby
=
[
$error_id
];
if
(
!
empty
(
$variables
[
'attributes'
][
'aria-describedby'
]))
{
$aria_describedby
[]
=
$variables
[
'attributes'
][
'aria-describedby'
];
}
$variables
[
'attributes'
][
'aria-describedby'
]
=
implode
(
' '
,
$aria_describedby
);
$variables
[
'error_id'
]
=
$error_id
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment