• Welcome to the official support community for the Marketers Delight WordPress theme. Most content here is private and to ask questions, get official support, and network with other WordPress users please register and verify your forum account to start posting today.

Feature Request: Add role and tabindex in Menus

gauravtiwari

Blogger
Messages
219
Reaction score
93
Website
gauravtiwari.org
AMP and other accessibility tests are asking for role and tabindex in menu trigger.

This was an easy fix and I edited templates/header-triggers.php and added role="menu" tabindex="0" to span element.

But I think this should be done permanently.
 

gauravtiwari

Blogger
Messages
219
Reaction score
93
Website
gauravtiwari.org
If that part is done, users can upload this simple dropin to activate full AMP support.


Already using it on gauravtiwari.org.

1626441392732.png

Class .noamp will hide a block/element in AMP mode (for example something that you don't want AMP users to see or something that is incompatible with AMP). Class .fullamp will make an element 100% in width (useful specially when you hide a column in 2-or-more columns settings).
 

Attachments

  • amp.zip
    826 bytes · Views: 3
Comment

Alex

MD developer
Messages
5,707
Reaction score
1,579
Very cool stuff here @gauravtiwari, we have a private AMP drop-in in the works already and will take your feedback here to further enhance it.

To your original request, I think the best solution is for MD to add a native hook to each header trigger that can accept HTML attributes from a drop-in or child theme. I am moving this to the Feedback & Suggestions forum and can include it with MD5.3.1, which is primarily an update for developer's. :)
 
Comment
Top