-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Empty accesskeys in navigation #5586
Comments
It should probably be |
|
@ausi noted that the change "would break I tested ausi's variant, it would work. BUT I noticed that you can't declare accesskey In the online demo (Contao 4.13.14) the input field for page accesskeys looks like this: In my local Contao 5.0.7 installation it looks like this by default: I did not enter the zero number. I also noticed you can only enter numbers in this field. When you enter any letter and save the page, it gets converted to a number. Is this behaviour correct/intended for accesskeys? |
This is actually an accidental change from #4797. I'll provide a PR to fix it. |
See #5590 |
Affected version(s)
5.0.7
Description
In a local test installation of Contao 5.0.7 in XAMPP (PHP 8.1.6) I noticed multiple empty
accesskey=""
in the HTML source code of navigation blocks. I did not set any keyboard shortcuts in the page settings in the backend. The accesskey fields in the backend show0
as default value.To investigate it, I made a copy of the template
nav_default.html5
and added a variable dump withIn the array lists
accesskey => false
is defined for all navigation elements.The accesskey is generated in this line in the template file:
contao/core-bundle/contao/templates/navigation/nav_default.html5
Line 7 in 015787f
To avoid the generation of the empty accesskeys I modified this snippet:
<?php if ('' !== $item['accesskey'] ): ?>
to this:
<?php if ('' !== $item['accesskey'] && $item['accesskey'] != false ): ?>
If someone can confirm the generation of empty accesskeys, it could be fixed in the core template.
The text was updated successfully, but these errors were encountered: