This is needed to screen readers know that the Select2 is disabled
when focus is put on the selection container. Because we were
mirroring the disabled state to the search input on a multiple
select in the past, this is really only needed for single select
elements which would not otherwise has the disabled property.
This was identified in a previous accessibility audit as being
something which Select2 did not properly report because we were
not setting the attributes properly.
Fixes#4575
Previously Select2 would assume that the tab index for the
`<select>` was `0`, which is the browser default. Now Select2 will
clone the tab index from the original element, and correctly restore
it when it is destroyed or disabled/enabled.
This closes https://github.com/select2/select2/issues/3031.
This adds basic tests to ensure that the selection is accessible by
all users. This checks for common attributes, ensuring that the
container is always keyboard accessible and follows ARIA guidelines.
This also changes the base selection to create a common element so
we don't need to repeat attributes and such across multiple selection
containers.