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
Merge requests
!101
Ref
#3461793
- Fix textarea ID and aria-describedby generation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Ref
#3461793
- Fix textarea ID and aria-describedby generation
issue/ui_suite_dsfr-3461793:fix-3461793-textarea_errors
into
1.0.x
Overview
0
Commits
1
Pipelines
4
Changes
1
Merged
Nicolas N
requested to merge
issue/ui_suite_dsfr-3461793:fix-3461793-textarea_errors
into
1.0.x
10 months ago
Overview
0
Commits
1
Pipelines
4
Changes
1
Expand
0
0
Merge request reports
Compare
1.0.x
version 3
36b79c75
7 months ago
version 2
16cb6252
7 months ago
version 1
1e045aba
10 months ago
1.0.x (base)
and
latest version
latest version
b51a0410
1 commit,
7 months ago
version 3
36b79c75
1 commit,
7 months ago
version 2
16cb6252
1 commit,
7 months ago
version 1
1e045aba
1 commit,
10 months ago
1 file
+
8
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
ui_suite_dsfr.theme
+
8
−
1
Options
@@ -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
;
}
}
Loading