Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What would be wrong with doing this?

Discussion in 'Website Coding & Programming Forum:' started by chris_17, Jul 8, 2011.

  1. chris_17

    chris_17 Member

    So, I was thinking with the new pseudo classes what's stopping you from creating more interactive hover effects using the content attribute and save you from using <span> to show the hover state etc.

    Screen readers would pick up the text in the <p> tags and then we just use the hover and before pseudo classes to show the new text.

    Could it be used or is just horribly non-semantic and inaccessible?!?!

    Here a JSFiddle anyways with what I mean.

    Edit this Fiddle - jsFiddle - Online Editor for the Web (JavaScript, MooTools, jQuery, Prototype, YUI, Glow and Dojo, HTML, CSS)

  2. Alex

    Alex Member

    Only possible problem I can see is that hiding text like that might upset Google if you get reported. Not sure, I'd be interested to hear what people think about this.
  3. Corrosive

    Corrosive Moderator Staff Member

    Yes, think I'd agree with Alex. The text is accessible as you say but would be interesting to see how Google sees it. In principal though I think it is the kind of thing we should be at least experimenting with as developers. Not sure about client/production sites just yet though.

Share This Page