-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Twig][Bootstrap 4 Theme]: Displaying errors like in official docs #29986
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
Comments
Rendering the errors as part of the label was done in an effort to improve accessibility (the And putting the error in the place where Bootstrap expects it to be also makes sense from a compatibility point of view (we have no guarantee that our "hacked" usage of Bootstrap will keep working fine in future updates) @Nyholm as you were the one doing that change in #24435 (and the related PR is essentially a revert of that one), could you participate here ? |
I've already tried and failed with this. :( I hope you will have better luck |
I experienced troubles with errors in labels too. First of all because all of a sudden While I am certainly thumbs up for accessibility in general, I am not sure that Symfony should change how Bootstrap is designed. If I choose Bootstrap as a front-end library and use Symfony's BS form templates, I expect everything to work according to the BS documentation. It means that I accept how BS approaches layout and accessibility and other problems. That's my choice. If I want to make my forms more accessible, I should replace some twig blocks or choose another front-end framework or create an issue in https://github.com/twbs/bootstrap. By default I want to see everything working according to BS docs and defaults because Symfony is supposed to provide a TwigBridge for Bootstrap, not an opinionated modified version. |
@vudaltsov I fully agree with you. Moreover, anyone that reads Bootstrap docs can see that they care about accessibility a lot ... so their current approach it's probably pretty (or fully) accessible and we don't need to change it. |
I don't have a problem with symfony having it's own opinionated layout. Just don't name it bootstrap3/4 layout. |
I am closing here as we already have #28086 which is the same. |
Symfony version(s) affected: 4.2.2
Description
As for me, error displaying is much prettier with official bootstrap v4 component/forms.
How to reproduce
Possible Solution
MR: #29987
Additional context
Currect views:


Horizontal:
Proposed:


Horizontal:
The text was updated successfully, but these errors were encountered: