Parcourir la source

Add role and aria-readonly attributes to single selection dropdown selected value

Michal Kleiner il y a 8 ans
Parent
commit
e1cda22475
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/js/select2/selection/single.js

+ 1 - 1
src/js/select2/selection/single.js

@@ -16,7 +16,7 @@ define([
     $selection.addClass('select2-selection--single');
 
     $selection.html(
-      '<span class="select2-selection__rendered"></span>' +
+      '<span class="select2-selection__rendered" role="textbox" aria-readonly="true"></span>' +
       '<span class="select2-selection__arrow" role="presentation">' +
         '<b role="presentation"></b>' +
       '</span>'