-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(champ.errors): add aria-labelledby error on champs wrapped withi…
…n a fieldset, make error messages always present and aria-live: assertive on validation error Co-authored-by: Corinne Durrmeyer <corinne@inseo.fr> Co-authored-by: Colin Darie <colin@darie.eu>
- Loading branch information
1 parent
331dfd3
commit 8453e12
Showing
6 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
module Dsfr | ||
class InputStatusMessageComponent < ApplicationComponent | ||
def initialize(errors_on_attribute:, error_full_messages:, described_by:, champ:) | ||
def initialize(errors_on_attribute:, error_full_messages:, describedby_id:, champ:) | ||
@errors_on_attribute = errors_on_attribute | ||
@error_full_messages = error_full_messages | ||
@described_by = described_by | ||
@describedby_id = describedby_id | ||
@champ = champ | ||
end | ||
|
||
def render? | ||
@errors_on_attribute | ||
end | ||
end | ||
end |
2 changes: 1 addition & 1 deletion
2
app/components/dsfr/input_status_message_component/input_status_message_component.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters