• Hello,

    I am showing Very Simple Event List widget in my sidebar but I noticed that the Widget title is h4 and the event titles below that are all h3.

    How could I change this? In order to pass the WCAG test I need to have headings in right order: h1, h2, h3, h4. So widget title would have to be h2 and event titles h3.

    Thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Guido

    (@guido07111975)

    Hi Mike,

    The widget title is handled by your theme. The only heading that my plugin adds is the H3 (event title) in the list with events.

    Guido

    Thread Starter mike86

    (@mike86)

    Thanks for your very quick response!

    Is there a way to change the H3 event title into H4 or H5? I was able to change the widget title coming from theme.

    Plugin Author Guido

    (@guido07111975)

    Hi,

    For that you should change files of my plugin, but you will loose these changes again in case of a plugin update.

    But I doubt if changing this has any positive effect, because most important headings are the H1 and H2. As far as I know it’s fine to have multiple H3s.

    Guido

    Thread Starter mike86

    (@mike86)

    With this code snippet I can change the widget title to h3:

    add_filter( 'widget_title', 'ddw_custom_widget_title_headline' );
    
    function ddw_custom_widget_title_headline( $title ) {
    
    	return '<h3>' . $title . '</h3>';
    
    }

    Do you have anything similar to change the H3 event title into H4 or H5? According to the WCAG rules I need to have headings in right order or I get this error:
    “Heading elements are not in a sequentially-descending order”.

    Plugin Author Guido

    (@guido07111975)

    Hi,

    No, don’t have a filter for it. Might add something for changing this in a future release. You can also consider using the date icon instead of a textual date.

    FYI: many websites contain multiple H3s… for instance, in case you have multiple widget areas (multiple widget titles).

    Guido

    Thread Starter mike86

    (@mike86)

    Thanks for considering adding this in the future!

    Yes many websites have multiple H3s in the footer and that is okay if above those H3s are only one H1 and then H2s.

    So with the sidebar of your plugin I would have to use H2 as a widget title and then the event title would be H3. Only problem is that the H2 is too large and I can’t change it to be small enough because the H2 is already use in several places that needs a bigger font size ?? And that is why I would like to change the event title to be H4 or H5.

    Plugin Author Guido

    (@guido07111975)

    This is wrong, date has nothing to do with the heading:

    You can also consider using the date icon instead of a textual date.

    You can target the sidebar widget titles directly with some CSS and make that H2 smaller. In that case you don’t have to wait until I have added this to my plugin. I consider adding a setting to change the H3 into a regular div (no heading).

    Guido

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Very Simple Event List Widget headings’ is closed to new replies.