jerome-toole / skindeep

1 stars 0 forks source link

Remove page title from categories #22

Closed briggySmalls closed 7 years ago

briggySmalls commented 7 years ago

Categories such as 'Back To Basics' have a banner image that displays the category title. The category title is also shown as text by the theme. The redundant title text should be removed. This includes product categories.

jerome-toole commented 7 years ago

yo briggy, have you considered SEO and accessibility on this? Those pages need the category name in the <title> tag, and a header (probably h1) of the category name. If you took the header away, I recommend you bring it back and add a css class as follows:

.visuallyhidden { 
  position: absolute; 
  overflow: hidden; 
  clip: rect(0 0 0 0); 
  height: 1px; width: 1px; 
  margin: -1px; padding: 0; border: 0; 
}

Hidden but not from screen readers or search engines.

briggySmalls commented 7 years ago

Tooley, I hadn't given it the blindest bit of consideration! Thanks for catching this. I have used the CSS you suggested (clever clever!) and applying it to the page-title when a new theme option archive_hide_title_cat has been checked in the customiser. As a result the selector is based off the archive and category classes on the body and page-title and hide-cat-title classes on the heading.

Whilst I do find the number of customisable options in the theme obfuscating, it also felt odd for the theme to hard-code hiding the title on category archives alone. Especially considering that the motivation for the change is because the title is currently contained within page header - a particular usage of the theme.