-
Notifications
You must be signed in to change notification settings - Fork 1
๐จ Palette: [์ ๊ทผ์ฑ] ํ์ ์กฐ์จ ์ ์ ๋ฒํผ ๋งฅ๋ฝ ์ถ๊ฐ #1263
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
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
69c645b
๐จ Palette: [์ ๊ทผ์ฑ] ํ์ ์กฐ์จ ์ ์ ๋ฒํผ ๋งฅ๋ฝ ์ถ๊ฐ
seonghobae 874cd83
๐จ Palette: [์ ๊ทผ์ฑ] ํ์ ์กฐ์จ ์ ์ ๋ฒํผ ๋งฅ๋ฝ ์ถ๊ฐ (๋ฆฌ๋ทฐ ๋ฐ์)
seonghobae 88ac96b
Merge branch 'develop' into palette-ux-calendar-a11y-1646642964316648โฆ
opencode-agent[bot] c13c797
ci(pr-1263): finalize calendar accessibility evidence
seonghobae f04303d
๐จ Palette: [์ ๊ทผ์ฑ] ํ์ ์กฐ์จ ์ ์ ๋ฒํผ ๋งฅ๋ฝ ์ถ๊ฐ (๋ฆฌ๋ทฐ ๋ฐ์ ๋ฐ CI ์์ )
seonghobae e0be203
๐จ Palette: [์ ๊ทผ์ฑ] ํ์ ์กฐ์จ ์ ์ ๋ฒํผ ๋งฅ๋ฝ ์ถ๊ฐ (๋ฆฌ๋ทฐ ๋ฐ์ ๋ฐ CI ์์ )
seonghobae 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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # False Positive Disposition: Bandit B506 (`yaml.load`) | ||
|
|
||
| ## Context and Evidence | ||
| Bandit reports a Medium severity B506 issue on `yaml.load()` calls because using the default loader can permit the instantiation of arbitrary Python objects, posing a security risk (PyCQA, 2024). However, in `backend/tests/test_release_governance.py`, `yaml.load` is explicitly invoked with `Loader=UniqueKeyLoader`. | ||
|
|
||
| The local implementation explicitly defines `UniqueKeyLoader` as a subclass of `yaml.SafeLoader`: | ||
| ```python | ||
| class UniqueKeyLoader(yaml.SafeLoader): | ||
| pass | ||
| ``` | ||
|
|
||
| Because `UniqueKeyLoader` inherits from `yaml.SafeLoader`, it automatically inherits all safety constraints, explicitly rejecting unsafe tags (e.g., `!!python/object/apply`). Tests in `test_release_governance.py` verify that `issubclass(UniqueKeyLoader, yaml.SafeLoader)` is true and that malicious YAML payloads are correctly rejected via `yaml.constructor.ConstructorError` rather than being executed (PyYAML, 2024). | ||
|
|
||
| Therefore, this finding is a verified false positive caused by a limitation in Bandit's static analysis, which triggers on the `yaml.load` function name without evaluating the inheritance chain of the provided `Loader` argument. | ||
|
|
||
| ## Resolution | ||
| The `yaml.load` call has been annotated with `# nosec B506` to suppress the false positive locally. We retain this suppression strictly under the condition that `UniqueKeyLoader` remains a subclass of `yaml.SafeLoader` and is explicitly provided to `yaml.load`. | ||
|
|
||
| ## Rollback Criteria | ||
| If the YAML loader implementation is modified to inherit from an unsafe loader, or if `yaml.load` is used without explicitly providing the safe custom loader, this disposition must be revoked and the `# nosec B506` annotation removed. | ||
|
|
||
| ## References | ||
| PyCQA. (2024). *B506: Test for use of yaml load*. Bandit Documentation. https://bandit.readthedocs.io/en/latest/plugins/b506_yaml_load.html | ||
| PyYAML. (2024). *PyYAML Documentation: Loading YAML safely*. https://pyyaml.org/wiki/PyYAMLDocumentation#loading-yaml-safely |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Calendar Coordination View Accessibility | ||
|
|
||
| `CalendarCoordinationView.tsx` presents numbered meeting proposals with date, time, attendance status, and a visible `์ ์ํ๊ธฐ` action label. | ||
|
|
||
| ## Accessibility problem | ||
|
|
||
| A short `aria-label` on the button would replace the descendant-derived accessible name and could omit the date, time, or attendance information needed to distinguish the proposals. Purely visual repetition can also make screen-reader output unnecessarily noisy. | ||
|
|
||
| ## Implemented pattern | ||
|
|
||
| Each button keeps its essential visible text in the accessibility tree and adds a visually hidden contextual prefix such as `<span className="sr-only">1์ ์ ์ํ๊ธฐ: </span>`. The duplicated visual option badge and trailing action label use `aria-hidden="true"`. The native button role and existing `focus-visible` ring remain intact. | ||
|
|
||
| This component pattern aligns with WCAG 2.2 Success Criterion 4.1.2, **Name, Role, Value**, and Success Criterion 2.4.7, **Focus Visible**. This scoped implementation statement does **not** establish conformance of the whole Naruon product. | ||
|
|
||
| ## Research note | ||
|
|
||
| Lazar et al. (2007) studied 100 blind web users and identified confusing screen-reader feedback and poorly designed or unlabeled controls among the leading sources of frustration. The proposal-button pattern therefore preserves task-specific context in the computed accessible name instead of relying on visual grouping alone. | ||
|
|
||
| ## References | ||
|
|
||
| Lazar, J., Allen, A., Kleinman, J., & Malarkey, C. (2007). What frustrates screen reader users on the web: A study of 100 blind users. *International Journal of HumanโComputer Interaction, 22*(3), 247โ269. https://doi.org/10.1080/10447310709336964 | ||
|
|
||
| World Wide Web Consortium. (2023a). *Understanding Success Criterion 2.4.7: Focus visible*. https://www.w3.org/WAI/WCAG22/Understanding/focus-visible.html | ||
|
|
||
| World Wide Web Consortium. (2023b). *Understanding Success Criterion 4.1.2: Name, role, value*. https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html |
64 changes: 64 additions & 0 deletions
64
frontend/src/components/calendar/CalendarCoordinationView.test.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| /* @vitest-environment jsdom */ | ||
| import React, { act } from "react"; | ||
| import { createRoot, type Root } from "react-dom/client"; | ||
| import { afterEach, describe, expect, it } from "vitest"; | ||
| import { CalendarCoordinationView } from "./CalendarCoordinationView"; | ||
|
|
||
| describe("CalendarCoordinationView", () => { | ||
| let container: HTMLDivElement | null = null; | ||
| let root: Root | null = null; | ||
|
|
||
| afterEach(() => { | ||
| if (root && container) { | ||
| act(() => { | ||
| root!.unmount(); | ||
| }); | ||
| container.remove(); | ||
| } | ||
| container = null; | ||
| root = null; | ||
| }); | ||
|
|
||
| it("renders buttons with distinct accessible names including date and attendance", () => { | ||
| container = document.createElement("div"); | ||
| document.body.appendChild(container); | ||
| root = createRoot(container); | ||
|
|
||
| act(() => { | ||
| root!.render(<CalendarCoordinationView />); | ||
| }); | ||
|
|
||
| const buttons = container.querySelectorAll("button"); | ||
| expect(buttons).toHaveLength(2); | ||
|
|
||
| // Assert focus class | ||
| buttons.forEach((btn) => { | ||
| expect(btn.className).toContain("focus-visible:ring-2"); | ||
| }); | ||
|
|
||
| // Check sr-only span content within buttons to ensure computed accessible name contains it | ||
| const button1 = buttons[0]; | ||
| const button2 = buttons[1]; | ||
|
|
||
| expect(button1.textContent).toContain("1์ ์ ์ํ๊ธฐ:"); | ||
| expect(button1.textContent).toContain("5์ 23์ผ (๋ชฉ) 14:00 - 15:00"); | ||
| expect(button1.textContent).toContain("๋ชจ๋ ์ฐธ์์ ์ฐธ์ ๊ฐ๋ฅ"); | ||
|
|
||
| expect(button2.textContent).toContain("2์ ์ ์ํ๊ธฐ:"); | ||
| expect(button2.textContent).toContain("5์ 24์ผ (๊ธ) 10:00 - 11:00"); | ||
| expect(button2.textContent).toContain("1๋ช (๊น๊ฐ๋ฐ) ๋ถ์ฐธ ์์"); | ||
|
|
||
| // Check aria-hidden on decorative elements | ||
| const ariaHiddenElements = container.querySelectorAll('[aria-hidden="true"]'); | ||
| // There are 2 option badges (1์, 2์) + 2 propose labels (์ ์ํ๊ธฐ) = 4 | ||
| expect(ariaHiddenElements).toHaveLength(4); | ||
|
|
||
| // verify option labels are aria-hidden | ||
| expect(Array.from(ariaHiddenElements).some(el => el.textContent === '1์')).toBe(true); | ||
| expect(Array.from(ariaHiddenElements).some(el => el.textContent === '2์')).toBe(true); | ||
|
|
||
| // verify propose labels are aria-hidden | ||
| const proposeLabels = Array.from(ariaHiddenElements).filter(el => el.textContent === '์ ์ํ๊ธฐ'); | ||
| expect(proposeLabels).toHaveLength(2); | ||
| }); | ||
| }); | ||
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.
Uh oh!
There was an error while loading. Please reload this page.