primer / view_components

ViewComponents for the Primer Design System
https://primer.style/components/
MIT License
450 stars 115 forks source link

Anchored position element align= attribute conflicting with html align attribute #2942

Open jonrohan opened 2 months ago

jonrohan commented 2 months ago

https://primer-lookbook.github.com/view-components/lookbook/inspect/primer/alpha/overlay/middle_of_page?_display=%257B%2522theme%2522%253A%2522light%2522%257D&size=medium

I noticed that the in the Overlay when there's a menu with a header the title aligns strangely. I thought for a minute this was part of the design but realized that this is because the browser has a built in align= attribute.

Image

I think to fix this we should have the <anchored-position element use anchor-align and anchor-side. To support any existing cases we could have it use either. But we should update our components to output the non-conflicting attribute

github-actions[bot] commented 2 months ago

Uh oh! @jonrohan, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

🤖 Beep boop! This comment was added automatically by github/accessibility-alt-text-bot.