Accessible HTML5 heading structure in WordPress

How to get a WordPress developer all emotional and fanatic: discuss about heading structure.
Here’s my point of view on how headings should be set up in a WordPress theme.
And an overview of the pros and cons brought up in discussions.

How to get a WordPress developer all emotional and fanatic: discuss about heading structure.

Here’s my point of view on how headings should be set up in a WordPress theme. And an overview of the pros and cons brought up in discussions.

Continue reading “Accessible HTML5 heading structure in WordPress”

A placeholder is no label; search forms in WordPress can do better

Wordpress developers can do better when building search forms. If it looks OK for me, it works OK for everyone? That point of view only counts when you can see properly. So how to do a search form for WordPress?

WordPress developers can do better when building search forms. If it looks OK for me, it works OK for everyone? That point of view only counts when you can see properly.

Continue reading “A placeholder is no label; search forms in WordPress can do better”

Placeholder met JavaScript

De HTML5 tag placeholder voor het HTML-element input werkt nu (2010) nog niet voor alle browsers. Dit is te ondervangen door een JavaScript.

Onderstaand script is van beyondstandards.com

/* Placeholder.js  */
/* Fills input text with value placeholder if no browser support */
/* From: http://www.beyondstandards.com/archives/input-placeholders */

function activatePlaceholders() {
var detect = navigator.userAgent.toLowerCase();
if (detect.indexOf(”safari”) > 0) return false;
var inputs = document.getElementsByTagName(”input”);
for (var i=0;i 0) {
    inputs[i].value = inputs[i].getAttribute(”placeholder”);
    inputs[i].onclick = function() {
     if (this.value == this.getAttribute(”placeholder”)) {
      this.value = “”;
     }
     return false;
    }
    inputs[i].onblur = function() {
     if (this.value.length < 1) {
      this.value = this.getAttribute(”placeholder”);
     }
    }
   }
  }
}
}
window.onload=function() {
activatePlaceholders();
}

Discussie:

Het script checkt nu of de browser Safari is. Mooier zou zijn als dit een check zou zijn op ondersteuning van de placeholder. Op staat (in een wat moeizaame layout) op  Detecting HTML5 Features van Diveintohtml5.org.

Op de lijst “dingen nog  te lezen en uit te zoeken” zetten.

Bronnen: