Support » Plugin: CC Child Pages » Accessibility – Thumbnail tag ‘title’ and ‘alt’ options

  • I’m new to the WordPress world, and perhaps I’ve gone about this in entirely the wrong way. However, when building a list of child pages with thumbnail images, I found the default behaviour (of using the child page title for both the ‘title’ and ‘alt’ tags on the thumbnail ) inappropriate for the site we’re working on. The featured images on those pages have ‘title’ and ‘alt’ properties associated with them, and I wanted those to flow through to the index as well.

    I have a suggested patch [not extensively tested but seemingly working] to add the option of overriding the ‘title’ and ‘alt’ attributes on the thumbnail tag either to static text (which could be “” if you want those attributes cleared altogether), or to “inherit” (which will use whatever attributes are associated with the image itself).

    Is there some place I can submit that? I’d be hopeful that this might make it into a future release in some form, so I’m not constantly re-patching (and this seems like something that others may also need).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author caterhamcomputing

    (@caterhamcomputing)

    You are right to point this out … because the shortcode can pick up images from various places and plugins (as well as the standard featured image), this was originally coded to default to using the title of the post for both the alt and title values.

    I am working on the next release of the plugin, and am looking at re-working this part of the code. There will still be times when using the post title is the only option, but for most images it should output the alt and title values stored for them.

    I may also look at adding some additional parameters (perhaps hide_alt and hide_img_title or similar) to allow suppressing the attributes altogether, although I will assess whether this is likely to be desirable when I code and test the changes mentioned above.

    Plugin Author caterhamcomputing

    (@caterhamcomputing)

    OK, I have a working fix for this which places uses the image’s alt property for the image and it’s title property for the title attribute of the link.

    Thinking about this a little further, I am going to make this something that you have to turn on with a shortcode parameter for 2 reasons:

    1. Backwards compatibility: I don’t want to change the behaviour of any existing sites unless it is unavoidable.
    2. Semantics: the title attribute in the link should actually reflect the page that it is linking to (I understand that you have made this the case with your images, but in theory the image titles should reflect the image).

    I am going to make these changes, and then once I have completed and tested all the other changes I will release the new version.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Accessibility – Thumbnail tag ‘title’ and ‘alt’ options’ is closed to new replies.