Building Web Pages with Hidden Content
Bits & Bytes Recap
Introduction
Have you ever felt like a modern-day treasure hunter, scouring the web for that one elusive piece of information? In National Treasure 2, Nicolas Cage’s character, Ben Gates, embarks on a thrilling quest to clear his family's name by finding the President's book of secrets. His journey spans various locations around the globe, culminating at the Library of Congress. This adventurous pursuit mirrors the challenge of navigating hidden content on a website. Just as the elusive book in the Library of Congress requires extra effort to uncover, important information on the web can be obscured, leading to user frustration and wasted time.
Types of Hidden Content
In Modern Campus, we use several snippets that include hidden content:
- Accordions
- Carousels
- Flashcards
- Modal pop-ups
- Tabs
- Rotating marquees
Best Practices for Hidden Content
User Experience
One of the fundamental principles in web design is ensuring that important information is easily accessible. Hiding critical content behind interactions like tabs, accordions, or modal pop-ups can lead to a poor user experience. Users may miss out on essential information if they don't interact with these elements. When using hidden content, it's crucial to evaluate whether the content you're hiding is truly secondary or if it should be more prominently displayed.
Accessibility
Hidden content should be accessible to all users, including those using screen readers. Our snippets already have accessibility features built in, so no additional coding is required to make them accessible. Providing screen reader-only text for links and buttons can also be very beneficial.
Drawbacks of Hidden Content
User Experience Issues
As with our National Treasure 2 example, hidden content can sometimes lead to confusion and frustration. Users may not realize that additional information is available, or they may find it cumbersome to click through multiple tabs or accordions. It's important to test your design with real users to identify any potential issues, including an increased bounce rate and lower user engagement.
SEO Impact
Search engines like Google index hidden content, including content inside accordions and tabs, as long as it's in the HTML when the page loads. However, they may deprioritize this content if it appears hidden by default, considering it less important than visible content. This could push your content past the first page of Google search results, which most users do not go beyond. To improve SEO impact, critical content should remain visible to users.
Benefits of Hidden Content
Improved Accessibility
Despite its drawbacks, hidden content can also offer improved accessibility. For example, screen reader-only text can provide additional context for links and buttons, making your site more navigable for visually impaired users. This approach ensures that all users have access to the same information, regardless of their abilities.
Enhances User Experience
Hidden content can significantly enhance the user experience by reducing clutter and improving site navigation. For example, using accordions to organize FAQs allows users to quickly find the information they need without scrolling through lengthy pages. Similarly, modal pop-ups can present supplementary information without diverting users from the main content.
Alternative Designs with Hidden Content
Accordion
Accordions can be a great tool for shortening pages or organizing FAQs. However, as a user, constantly opening accordions to view information can become tiresome, especially when pressed for time. An alternative is to extract key information and place it in a paragraph, while keeping secondary information in the accordion. This approach ensures that primary content is easily accessible to all users, with the option to read the secondary content if needed.
Rotating Marquee
Rotating marquees can add character and personality to a site, effectively conveying its purpose and audience through imagery. However, placing important content in these marquees, especially after the first image, can cause users to miss critical information they came for. A better approach is to extract the key information and display it as static content on the page, such as right below the marquee. This way, you can maintain the visual appeal of the rotating marquee while ensuring that essential information is easily accessible to all users.
Q & A
Q: How can you format FAQs outside of using an accordion?
A: Before we get into formatting, the first thing to do is assess if an FAQ is really needed. Sometimes, an FAQ is a last effort for users to find information and could be the result of a poorly structured site. If the answer to a question makes more sense on a specific page or section, consider reformatting that page to help users answer that question.
If an FAQ is needed, there are many different ways it can be formatted. The two that we recommend would be to simply use paragraphs, similar to how this Q&A is, utilize our FAQ Example Page Layout with each Q&A contained in a box, group the FAQs together into similar themes and create a bulleted list or keep the accordions. Pick the design that is best for your users and fits well with the content you have.
Q: When should I use Screen Reader only text?
A: Screen reader only (sr-only) text can be very useful but also tricky. For us, its most common use is for extra information on buttons to provide a uniform design throughout a page. Another common use that is fairly new is including an Icon Description for Font Awesome icons. This description gives you the opportunity to provide key information for the icon such as the clock(
) symbolizes when an event starts.While the use of sr-only text is great, keep in mind the users who use voice commands. If there are 4 "Learn More" buttons with sr-only text that includes what you will learn more about, a sighted user using voice commands will not see that extra information. So, if they say "Click 'Learn More'", the system won't know which button to select since there is no button with just the "Learn More" text.
Q: Is it better to format content in tabs or as separate pages?
A: This depends on the type and amount of content you are working with. Tabs are useful
for organizing related content that users might want to switch between quickly. They
keep the interface clean and reduce the need for page reloads, which can enhance the
user experience by making navigation faster and more seamless. Tabs are particularly
useful for content that is closely related and can be easily segmented into categories,
such as testimonials and category specification.
Separate pages, on the other hand, are better suited for more extensive content. They
allow for more in-depth exploration and can improve SEO by providing more entry points
for search engines. Separate pages are ideal for content that requires an in-depth
focus, such as detailed guides or stand stand-alone topic of a website.
Conclusion
In conclusion, while hidden content can enhance accessibility and reduce clutter, it's important to ensure that primary information remains easily accessible to users and search engines. Balancing these elements is key to effective web design and a positive user experience.
Happy Designing!
References
- Accordions Are Not Always the Answer for Complex Content on Desktops
- Does hidden content affect SEO?