-
Notifications
You must be signed in to change notification settings - Fork 0
๐จ Palette: ๋์๋ณด๋ ํ์ผ ์ ๋ ฅ UI ๊ฐ์ ๋ฐ ์ปค์คํ ๋ฒํผ ํ๋ก์ ์ ์ฉ #887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
seonghobae
wants to merge
1
commit into
develop
from
feat/palette-ux-proxy-file-input-4739174171062343367
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐ฏ Functional Correctness | ๐ก Minor | โก Quick win
๐งฉ Analysis chain
๐ Script executed:
Repository: ContextualWisdomLab/appguardrail
Length of output: 8332
๐ Web query:
WAI-ARIA aria-hidden focusable elements tabindex -1 programmatic focus native file input click label display none specification๐ก Result:
Using aria-hidden="true" on focusable elements is strongly discouraged by accessibility specifications and best practices because it creates inconsistent and often broken experiences for assistive technology (AT) users [1][2]. Focusable Elements and aria-hidden While the aria-hidden="true" attribute is intended to remove an element and its children from the accessibility tree, browsers and AT often struggle to handle focusable elements marked as aria-hidden [1][2]. If an element is focusable (e.g., has a positive or default tabindex, or is a native interactive element like a button or input), it remains in the tab order even if marked aria-hidden [3][2]. When a user focuses these elements, browser behavior is not interoperable: some AT may announce them without a name, some may ignore them entirely, and others may treat them normally [2]. Specifications are actively evolving to improve how user agents handle these scenarios to mitigate author errors, but reliance on this behavior is unsafe [4][5]. The modern, recommended alternative for removing content from the accessibility tree while also preventing keyboard interaction is the HTML inert attribute [2]. Native File Input Styling and Accessibility To style a native file input, the industry-standard "visually hidden label" pattern is the only universally accessible approach [6][7]. 1. Do not use display: none or visibility: hidden on the input: These CSS properties remove the element from the accessibility tree and, in many browsers, will prevent it from receiving focus or responding to events [1][6][7]. 2. Use the visually hidden (clip) technique: Hide the using CSS that keeps it in the document flow but makes it invisible (e.g., absolute positioning, clipping, or zero-dimension sizing) [6][7]. 3. Associate with a label: Use a with a for attribute matching the input's id [6]. When a user clicks the label, the browser natively triggers the file picker dialog [8][6]. This is a "trusted" event, which is required for security reasons [9]. 4. Avoid programmatic click delegation: Attempting to trigger the file picker via JavaScript (e.g., element.click) on a hidden input frequently fails because browsers block such actions unless they are part of a trusted, direct user gesture [8][9]. Relying on the native label association ensures the browser trusts the interaction [6][9]. In summary, always ensure interactive elements remain exposed to the accessibility tree (avoid aria-hidden="true" on them) and use the native label association to trigger file inputs rather than trying to force programmatic clicks [2][6][7].
Citations:
aria-hidden="true"๋ฅผ ์ ๊ฑฐํ๊ณ ํ์ผ ์ ๋ ฅ์ ์ ๊ทผ์ฑ ๊ฒฝ๋ก๋ฅผ ์์ ํ์ธ์.tabindex="-1"๋ ํญ ์์์์๋ง ์ ์ธํ๋ฉฐ, ์คํฌ๋ฆฝํธ ํฌ์ปค์ค๋ ํ์ฉํฉ๋๋ค. ๋ฐ๋ผ์ ํ์ฌ์.sr-onlyํ์ผ ์ ๋ ฅ์aria-hidden="true"๋ฅผ ํจ๊ป ์ฌ์ฉํ๋ฉด ์ ๊ทผ์ฑ ํธ๋ฆฌ์ ํฌ์ปค์ค ๊ฐ๋ฅ ์ํ๊ฐ ์ถฉ๋ํฉ๋๋ค.aria-hidden์ ์ ๊ฑฐํ๊ณ ํ์ผ ์ ๋ ฅ์ ์ ๊ทผ ๊ฐ๋ฅํ ์ด๋ฆ์ ์ ๊ณตํ์ธ์. ํ์ผ ์ ํ์ ํ๋ก์ํ๋ ค๋ฉด<label for="file">ํจํด์ ์ฌ์ฉํ์ธ์.๐ค Prompt for AI Agents