Sort By on Product Listings
The "sort by" dropdown in shadows doesn't work for keyboard, at least for 2025 shadows. If you tab into it and use the arrows it doesn't allow you to select what you want. Here's the fix.
First, find the sort by dropdowns. There may be one at the top and bottom of the CTGY and SRCH pages.
Find this:
<select id="l-sort_by_top" class="c-form-select__dropdown" name="Sort_By" onchange="MMProdList_UpdateQuery( this ); return true;">
Get rid of the onchange inline js and change it to this:
<select id="l-sort_by_top" class="c-form-select__dropdown js-keyboard-sort" name="Sort_By">
Then add this js to the bottom of the CTGY and SRCH pages (or whatever pages you did this fix on.)
<mvt:comment>
#
# Fix the tab/arrow navigation for the sort-by dropdowns.
# Also keeps normal mouse and mobile navigation as is.
# Good for ADA compliance
#
</mvt:comment>
<script>
document.querySelectorAll('.js-keyboard-sort').forEach(function (sel) {
var usingKeys = false;
sel.addEventListener('keydown', function (e) {
if (e.key === 'Enter') {
MMProdList_UpdateQuery(sel);
} else {
usingKeys = true;
}
});
sel.addEventListener('mousedown', function () { usingKeys = false; });
sel.addEventListener('change', function () {
if (!usingKeys) MMProdList_UpdateQuery(sel);
});
});
</script>
Quantity Adjustment Buttons on Basket (BASK) Page
Update the class="x-quantity" buttons with this code:
<div class="x-quantify" data-hook="quantify">
<button type="button" class="c-button c-button--secondary" data-action="decrement">
<span class="u-icon-subtract" aria-hidden="true"></span>
<span class="u-hide-visually">Decrease quantity of &mvte:group:name;</span>
</button>
<label for="l-quantity-&mvte:group:group_id;" class="u-hide-visually">Quantity of &mvte:group:name;</label>
<input id="l-quantity-&mvte:group:group_id;" class="c-form-input u-color-gray-40 u-text-center" data-group="group-&mvte:group:group_id;" data-hook="group-quantity" data-max="" data-min="1" data-step="1" type="text" inputmode="numeric" name="Quantity" value="&mvt:group:quantity;" required>
<button type="button" class="c-button c-button--secondary" data-action="increment">
<span class="u-icon-add" aria-hidden="true"></span>
<span class="u-hide-visually">Increase quantity of &mvte:group:name;</span>
</button>
</div>
OCST: Customer Information
The customer information blocks are pretty broken, too much to put here, contact us for more info.
https://www.scotsscripts.com/mvblog/ada-accessibility-updates-for-miva-merchant-shadows-framework.html