longbill / jquery-date-range-picker

A jQuery plugin that allows user to select a date range
MIT License
1.12k stars 579 forks source link

Add accessibility features #489

Open llinde opened 4 years ago

llinde commented 4 years ago

Hi

Any chance you could add tabindex="0" and role="button" on the dates?

The calendar is pretty much useless for users who only use the keyboard to navigate webpages.

Note: I did try using a modified version of this code from your Demonstrations page, but with no luck:

showDateFilter: function(time, date)
{
    return '<div style="padding:0 5px;">\
            <span style="font-weight:bold">'+date+'</span>\
            <div style="opacity:0.3;">$'+Math.round(Math.random()*999)+'</div>\
           </div>';
}

Kind regards Lars Linde