8000 [Form][WCAG] Errors sign for people that do not see colors by Nyholm · Pull Request #26327 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form][WCAG] Errors sign for people that do not see colors #26327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
<div class="{% if form is not rootform %}invalid-feedback d-block{% else %}alert alert-danger{% endif %}">
<ul class="list-unstyled mb-0">
{%- for error in errors -%}
<li>{{ error.message }}</li>
<li><span class="initialism form-error-icon badge badge-danger">{{ 'error'|trans }}</span> <span class="form-error-message">{{ error.message }}</span></li>
Copy link
Member
@nicolas-grekas nicolas-grekas 8000 Mar 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a raw idea: instead of "error", we put that "X" unicode cross,
then we add a translation table where this "X" maps to "ERROR" in english, same in a few other languages,
but if we don't have the translation for the word "error", the cross is displayed instead - as it is more universal than "error", isn't it?
makes sense?

{%- endfor -%}
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ public function testRow()
[
./div[
./ul
[./li[.="[trans]Error![/trans]"]]
[./li
[./span[.="[trans]error[/trans]"]]
[./span[.="[trans]Error![/trans]"]]
]
[count(./li)=1]
]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ public function testRow()
[
./div[
./ul
[./li[.="[trans]Error![/trans]"]]
[./li
[./span[.="[trans]error[/trans]"]]
[./span[.="[trans]Error![/trans]"]]
]
[count(./li)=1]
]
]
Expand Down Expand Up @@ -166,9 +169,12 @@ public function testErrors()
[@class="list-unstyled mb-0"]
[
./li
[.="[trans]Error 1[/trans]"]
[./span[.="[trans]error[/trans]"]]
[./span[.="[trans]Error 1[/trans]"]]

/following-sibling::li
[.="[trans]Error 2[/trans]"]
[./span[.="[trans]error[/trans]"]]
[./span[.="[trans]Error 2[/trans]"]]
]
[count(./li)=2]
]
Expand Down
0