The for Google, FB, etc should have alt tags. Can do so via the login-with.html.twig file. The patch takes the last word in the path (Facebook and Google for me) to make an alt tag of 'Social Login Facebook' etc.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3111718-alt-tags.patch | 603 bytes | bryantt |
Comments
Comment #2
bryantt commentedComment #3
bryantt commentedComment #4
bryantt commentedComment #5
bryantt commentedComment #6
wellsComment #7
gaards commentedThe proposed patch won't unfortunately work if the
/user/path is overridden, for example when using the Rename Admin Paths module.Ideally we would have a name attribute/key available in the
social_networksvariable, then we could access it withsocial_network.namein Twig. Trying to retrieve the auth provider name through the path isn't an ideal solution, as the Twig part becomes harder to understand and the logic becomes a bit hacky.Also I think the "Social Login" string proposed in the patch could be replaced with something like:
'Authenticate through @social_network_name'|t({'@social_network_name': social_network.name})That would also be translatable.
Comment #8
wellsThanks for the feedback, @gaards. I'll be pushing a commit using that format. We can get the social network from the
@Networkdeclarations easily enough. As a future enhancement, it might be easier to move therouteandimg_pathdeclarations there as well instead of usingSocialAuthController::setLoginButtonSettingson implementer login. But that would require updates from all implementers so something for a a breaking version perhaps.Comment #10
wells