Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6719225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:04:02+00:00 2026-05-26T09:04:02+00:00

Is there any alternative to <div> ? My website is losing accessibility because I

  • 0

Is there any alternative to <div>? My website is losing “accessibility” because I cannot set focus on a <div>. What control should I use in order to replicate <div> and still hold focus?

This is what my HTML looks like:

<div style="height:70px; overflow:hidden" id="divMsg">
   <div class="DivClass">abcdefg abcdkfjghfjdfkj</div><br>
   <div class="DivClass">abcdefg abcdkfjghfjdfkj</div><br>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:04:02+00:00Added an answer on May 26, 2026 at 9:04 am

    You can add tabindex to make it focusable; however, this is usually not enough. If you want the element to be clickable, you will also need to add a keydown or keypress handler so that the user can activate it using ENTER, similar to a A link. Otherwise the user will be able to tab to it, but may not be able to do anything with the link after.

    If you are trying to create a clickable element, it is sometimes simpler to start with a A tag, and then style it so that doesn’t look like a link. A elements respond to both keyboard and mouse and fire onclick for both, so you don’t have to do additional keyboard input handing like you do with a DIV.

    Finally, if you are making a DIV or A that visually looks like a button or some other control, add the appropriate ARIA role so that a screenreader will call out the appropriate element type – eg.

    <a HREF="javascript:void(0)" onclick="dosomething()" role="button">Complete Transaction</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any alternative image manipulation library for .net? I would prefer something that
Is there any alternative for WPF (windows presentation foundation) in python? http://msdn.microsoft.com/en-us/library/aa970268.aspx#Programming_with_WPF
Is there any alternative to Axis2? Or the way to make it work (different
Is there any alternative to this: Organizations.Include(Assets).Where(o => o.Id == id).Single() I would like
How do you SortDictionary by value (.NET 2.0)? Or is there any alternative to
Is there any good alternative to ASpell? It's nice open source, but haven't been
Is there any better alternative for doing string formatting in VC6, with syntax checking
Is there an alternative to history.go(-1) for FireFox and Safari. Any Help would be
The code below works, but I suspect there is be a cleaner. Any alternative
Is there any alternative for adding the below html other than in the template

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.