Merge pull request #20598 from calixteman/fix_sidebar_resize

Fix the sidebar resizer accessibility
This commit is contained in:
Tim van der Meij 2026-01-29 21:42:30 +01:00 committed by GitHub
commit 2cef80d05b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 8 deletions

View File

@ -48,6 +48,7 @@
min-width: var(--sidebar-min-width); min-width: var(--sidebar-min-width);
max-width: var(--sidebar-max-width); max-width: var(--sidebar-max-width);
backdrop-filter: var(--sidebar-backdrop-filter); backdrop-filter: var(--sidebar-backdrop-filter);
box-sizing: border-box;
.sidebarResizer { .sidebarResizer {
width: var(--resizer-width); width: var(--resizer-width);

View File

@ -64,12 +64,10 @@ class Sidebar {
this.#initialWidth = this.#width = parseFloat( this.#initialWidth = this.#width = parseFloat(
style.getPropertyValue("--sidebar-width") style.getPropertyValue("--sidebar-width")
); );
resizer.ariaValueMin = parseFloat( resizer.ariaValueMin =
style.getPropertyValue("--sidebar-min-width") parseFloat(style.getPropertyValue("--sidebar-min-width")) || 0;
); resizer.ariaValueMax =
resizer.ariaValueMax = parseFloat( parseFloat(style.getPropertyValue("--sidebar-max-width")) || Infinity;
style.getPropertyValue("--sidebar-max-width")
);
resizer.ariaValueNow = this.#width; resizer.ariaValueNow = this.#width;
this.#makeSidebarResizable(); this.#makeSidebarResizable();
@ -123,7 +121,7 @@ class Sidebar {
window.addEventListener( window.addEventListener(
"pointermove", "pointermove",
ev => { ev => {
if (!pointerMoveAC) { if (!pointerMoveAC || Math.abs(ev.clientX - this.#prevX) < 1) {
return; return;
} }
stopEvent(ev); stopEvent(ev);

View File

@ -278,7 +278,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="attachmentsView" class="hidden"></div> <div id="attachmentsView" class="hidden"></div>
<div id="layersView" class="treeView hidden"></div> <div id="layersView" class="treeView hidden"></div>
</div> </div>
<div id="viewsManagerResizer" class="sidebarResizer"></div> <div id="viewsManagerResizer" class="sidebarResizer" role="separator" aria-controls="viewsManager" tabindex="0"></div>
</div> </div>
<!-- sidebarContainer --> <!-- sidebarContainer -->