@@ -34,6 +34,32 @@ test.describe('a11y-messages playground (static hub build)', () => {
3434 await expect ( page . locator ( '[data-df-a11y-overlay]' ) ) . toContainText ( 'image-alt' )
3535 } )
3636
37+ test ( 'keeps the a11y summary controls above scrolled violations' , async ( { page } ) => {
38+ await page . setViewportSize ( { width : 1_000 , height : 360 } )
39+ const panel = page . frameLocator ( 'iframe[title="A11y Inspector"]' )
40+
41+ await expect ( panel . getByRole ( 'checkbox' , { name : / i m a g e - a l t / } ) ) . toBeVisible ( )
42+ const scrollArea = panel . locator ( '#a11y-scroll' )
43+ const summary = scrollArea . locator ( ':scope > div' ) . first ( )
44+ await scrollArea . evaluate ( element => element . scrollTo ( { top : element . scrollHeight } ) )
45+
46+ expect ( await scrollArea . evaluate ( element => element . scrollTop ) ) . toBeGreaterThan ( 0 )
47+ expect ( await summary . locator ( 'button' ) . evaluateAll ( buttons => buttons . flatMap ( ( button ) => {
48+ const bounds = button . getBoundingClientRect ( )
49+ const hitTarget = document . elementFromPoint (
50+ bounds . left + bounds . width / 2 ,
51+ bounds . top + bounds . height / 2 ,
52+ )
53+ return hitTarget != null && button . contains ( hitTarget )
54+ ? [ ]
55+ : [ button . getAttribute ( 'aria-label' ) ?? button . title ?? button . textContent ?. trim ( ) ]
56+ } ) ) ) . toEqual ( [ ] )
57+
58+ const critical = panel . getByRole ( 'button' , { name : / C r i t i c a l i s s u e s / } )
59+ await critical . click ( )
60+ await expect ( critical ) . toHaveAttribute ( 'aria-pressed' , 'true' )
61+ } )
62+
3763 test ( 'messages panel renders the baked feed; its activate action switches docks over the BroadcastChannel' , async ( { page } ) => {
3864 await page . click ( 'button[data-dock-id="devframes_plugin_messages"]' )
3965 const panel = page . frameLocator ( 'iframe[title="Messages"]' )
0 commit comments