From the Lab: Abbreviations and Lexicon

This month at Lab Hours, we had several participants seeking the same thing -- How to provide site visitors pop-up definitions for acronyms and abbreviations. Oh, and could we please do this in a way that does not require extra data-entry from our content editors? A seemingly tall order turns out to have a rather straight-forward recipe combining a Drupal module, taxonomy and some obscure HTML tags no one seemed to know existed.

Obscure HTML elements revealed

Our first revelation occurred while unadvisedly trying to solve the display issue first. Looking for popup options, the Beauty Tips module seemed up to the task of providing an elegant solution. However, while casually Googling the term "acronym" -- the reason for the popups -- we uncovered two HTML elements we were not yet familiar with -- acronym and abbr (for abbreviation).

These elements seem to do it all -- mark the tagged acronym or abbreviation (dotted underline) and provide the description in a popup tooltip. Just what we were looking to do (albeit with some caveats for different browsers and HTML 5). Not only that, but using them adds semantic value to our content and increases accessibility.

This was all well and good, but only satisfied our display requirements. We were not looking forward to the prospect of editing all of our existing content to add HTML tags to acronyms and abbreviations. We were also concerned that it would be too clunky to expect occasional content providers to tag them properly when adding new content -- despite there being TinyMCE WYSIWYG toolbar buttons for each element. Enter the Lexicon module.

Finding the right module for the job

Lexicon, as its project page explains "generates one or more Lexicon pages based on terms in taxonomies and optionally marks and links them in the content." Lexicon definition pages will certainly be useful, but it's the that last feature that really caught our attention. To get it all to work, you create a vocabulary of terms with definitions -- which can include acronyms and abbreviations with their fully spelled-out descriptions. Once you've configured Lexicon's settings, your terms will be marked where they appear in content. Bringing us full circle, one of the marking options is to wrap appearing terms in the abbr HTML tag (acronym as well but this element has been deprecated in HTML5). The result is an on-hover triggered definition popup with an optional link to a lexicon page listing terms and definitions. Just what we were seeking to do and more.

Taking it further

This recipe is still a work-in-progress. At future sessions, I expect we'll be exploring multiple vocabularies, lexicon page management as well as cross-browser and custom styling issues. The bottom line is we "discovered" a solution to a situation faced by several organizations which ended up suggesting a valuable new feature for several more. We look forward to seeing where they take the concept next.

  • It's the heart of everything we do: a clear process to plan, organize, and measure your goals.

  • It's nice to have a helping hand once in awhile. Each week, we make space available for you to bring your laptop in and work on your project. If you need help, we're around for questions, and so are the other lab hours participants.

Comments

Thanks, Moshe! When I wrote

Thanks, Moshe! When I wrote that no one seemed to know about the tags, I meant in our local group not Drupal or the community at large. We belatedly discovered them by Googling and quickly found that Glossary and its fork, Lexicon, have been using them. Checking into what Glossary needs for updating is now on my list.

Add new comment | Advantage Labs, Inc.

Very good site you have here but I was curious if you knew of any user discussion forums that cover the
same topics talked about here? I'd really like to be a part of online community where I can get comments from other experienced individuals that share the same interest. If you have any suggestions, please let me know. Thank you!

Visit my webpage ... financial information

about world news

Considerably, this post is really the sweetest on this notable topic. I harmonise with your conclusions and will thirstily look forward to your incoming updates. Saying thanks will not just be sufficient, for the phenomenal clarity in your writing. I will directly grab your rss feed to stay informed of any updates. Admirable work and much success in your business dealings!  Please excuse my poor English as it is not my first tongue.

about world news

Cara Membesarkan Payudara
Blogger Template
Blogger Widget

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br> <span> <div>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.