Skip to content

ACR#7906

Merged
mrfinch merged 5 commits intomasterfrom
nwinter/acr
Feb 3, 2025
Merged

ACR#7906
mrfinch merged 5 commits intomasterfrom
nwinter/acr

Conversation

@nwinter
Copy link
Copy Markdown
Contributor

@nwinter nwinter commented Jan 20, 2025

Adds the accessibility compliance report. Landing page at /acr, embeds the HTML version output from the ACR tool, also links to HTML and YAML downloads of same. Also adds a link to the accessibility description in /schools and adds it to the footer for US users.

Page

Screenshot 2025-01-31 at 15 02 43

Schools Page Link

Screenshot 2025-01-31 at 15 02 24

Footer link

This is just for US users, as these regulations are mostly relevant here, and the ACR itself isn't localized. Non-US users would still see it from /schools page or direct link, but we probably don't need in the footer.
Screenshot 2025-01-31 at 15 15 59

Summary by CodeRabbit

  • New Features

    • Added a new route for the Accessibility Conformance Report (ACR) page.
    • Introduced a new Vue component for displaying ACR details.
    • Enhanced navigation with a new accessibility option.
    • Added conditional accessibility resources in the footer.
  • Style

    • Updated CSS styles for the ACR view, including hiding specific elements.
    • Implemented responsive design for the ACR page.
  • Documentation

    • Added comprehensive ACR page with sections on accessibility, diversity, and inclusion.
    • Expanded translations for various sections, including new features and resources.

nwinter and others added 4 commits January 17, 2025 12:26
This will hold our Accessibility Conformance Report, which gets
automatically generated from the OpenACR editor. This is a
marketing/landing page that embeds that page, restyles it a bit, and
provides it (and a .yaml version) for download.

Our ACR is not done yet, just a placeholder. The marketing content on
this page is also just a placeholder for now.
@nwinter nwinter requested a review from mrfinch January 20, 2025 22:05
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 20, 2025

Walkthrough

The pull request introduces a new Accessibility Conformance Report (ACR) feature to the application. This involves creating a new route for the /acr path, developing a Vue component to display the ACR, and adding specific CSS styling for the ACR view. The changes include routing configuration updates in both the core router and Vue router, a new Vue component for the ACR view, and custom CSS styles to control the visual presentation of the ACR content.

Changes

File Change Summary
app/core/Router.js Added new route for acr mapping to core/SingletonAppVueComponentView
app/core/vueRouter.js Added new Vue route /acr loading ACRView component
app/views/acr/ACRView.vue Created new Vue component for Accessibility Conformance Report view
app/assets/acr/acr.css Added CSS rules to style ACR view, hiding specific elements and setting layout properties
app/components/common/Footer.vue Added conditional accessibility resource link in footer
app/components/common/Navigation.vue Added new ACCESSIBILITY navigation item and corrected variable name

Sequence Diagram

sequenceDiagram
    participant User
    participant Router
    participant VueRouter
    participant ACRView

    User->>Router: Navigate to /acr
    Router->>VueRouter: Route request
    VueRouter->>ACRView: Load ACRView component
    ACRView-->>User: Render Accessibility Conformance Report
Loading

Possibly related PRs

Suggested reviewers

  • mrfinch

Poem

🐰 A Rabbit's Ode to Accessibility 🌈

In lines of code, a new path unfurls,
ACR view dances, its message it hurls
Styles tucked away, elements hide
Compliance and inclusion, side by side
A digital welcome, open and bright! 🌟

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
app/views/acr/ACRView.vue (2)

1-14: Add TypeScript and enhance component structure.

The component structure could be improved for better maintainability and type safety:

  1. Consider using TypeScript for better type safety
  2. Add props validation for any incoming props
  3. Document the component's purpose using JSDoc
  4. Define required component imports
<script>
+import { defineComponent } from 'vue'
+
+/**
+ * @component ACR
+ * @description Displays the Accessibility Conformance Report (ACR) and related information
+ */
+export default defineComponent({
-export default {
   name: 'ACR',
   components: {
+    // Add required components
   },

-  data: () => ({
-  }),
+  data: () => ({
+    // Document the purpose of each data property
+    loading: false
+  }),

   methods: {
+    // Document each method's purpose
+    onClickSalesCTA() {
+      // Implementation
+    }
   },
-}
+})
</script>

233-233: Remove trailing space.

Fix the eslint warning by removing the trailing space:

-    img.logo-image { 
+    img.logo-image {
🧰 Tools
🪛 eslint

[error] 233-233: Trailing spaces not allowed.

(no-trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d9f5b1c and 4549b1e.

📒 Files selected for processing (4)
  • app/assets/acr/acr.css (1 hunks)
  • app/core/Router.js (1 hunks)
  • app/core/vueRouter.js (1 hunks)
  • app/views/acr/ACRView.vue (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • app/assets/acr/acr.css
🧰 Additional context used
🪛 eslint
app/views/acr/ACRView.vue

[error] 233-233: Trailing spaces not allowed.

(no-trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: ESLint CI
  • GitHub Check: Node.js CI (18.10.0)
🔇 Additional comments (2)
app/core/vueRouter.js (1)

459-462: LGTM! Route configuration follows best practices.

The new route is properly configured with:

  • Correct path definition
  • Lazy loading using dynamic import
  • Consistent naming convention for the chunk
app/core/Router.js (1)

564-565: LGTM! Backbone route properly configured.

The new route is correctly added using the SingletonAppVueComponentView pattern, consistent with other Vue-based routes in the application.

Comment on lines +65 to +67
.text-center
a.btn.btn-primary.btn-large.btn-moon.sales-btn(href="https://docs.google.com/presentation/d/1KgFOg2tqbKEH8qNwIBdmK2QbHvTsxnW_Xo7LvjPsxwE/edit?usp=sharing" target="_blank") Sample Lesson
a.btn.btn-primary.btn-large.btn-moon.sales-btn(@click="onClickSalesCTA") Request a Quote
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add ARIA labels to buttons.

The buttons need proper ARIA labels for better accessibility:

-        a.btn.btn-primary.btn-large.btn-moon.sales-btn(href="https://docs.google.com/presentation/d/1KgFOg2tqbKEH8qNwIBdmK2QbHvTsxnW_Xo7LvjPsxwE/edit?usp=sharing" target="_blank") Sample Lesson
-        a.btn.btn-primary.btn-large.btn-moon.sales-btn(@click="onClickSalesCTA") Request a Quote
+        a.btn.btn-primary.btn-large.btn-moon.sales-btn(
+          href="https://docs.google.com/presentation/d/1KgFOg2tqbKEH8qNwIBdmK2QbHvTsxnW_Xo7LvjPsxwE/edit?usp=sharing"
+          target="_blank"
+          aria-label="View sample lesson in new tab"
+        ) Sample Lesson
+        a.btn.btn-primary.btn-large.btn-moon.sales-btn(
+          @click="onClickSalesCTA"
+          role="button"
+          aria-label="Request a quote for our services"
+        ) Request a Quote
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.text-center
a.btn.btn-primary.btn-large.btn-moon.sales-btn(href="https://docs.google.com/presentation/d/1KgFOg2tqbKEH8qNwIBdmK2QbHvTsxnW_Xo7LvjPsxwE/edit?usp=sharing" target="_blank") Sample Lesson
a.btn.btn-primary.btn-large.btn-moon.sales-btn(@click="onClickSalesCTA") Request a Quote
.text-center
a.btn.btn-primary.btn-large.btn-moon.sales-btn(
href="https://docs.google.com/presentation/d/1KgFOg2tqbKEH8qNwIBdmK2QbHvTsxnW_Xo7LvjPsxwE/edit?usp=sharing"
target="_blank"
aria-label="View sample lesson in new tab"
) Sample Lesson
a.btn.btn-primary.btn-large.btn-moon.sales-btn(
@click="onClickSalesCTA"
role="button"
aria-label="Request a quote for our services"
) Request a Quote

Comment on lines +34 to +36
section#acr-report
h1.heading-corner Full Report
iframe#acr-iframe(src="/acr/acr.html" frameborder="0" scrolling="no" onload="this.style.height = this.contentWindow.document.documentElement.scrollHeight + 'px';")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance iframe accessibility.

The iframe needs a title and better height management:

-      iframe#acr-iframe(src="/acr/acr.html" frameborder="0" scrolling="no" onload="this.style.height = this.contentWindow.document.documentElement.scrollHeight + 'px';")
+      iframe#acr-iframe(
+        src="/acr/acr.html"
+        title="Accessibility Conformance Report"
+        frameborder="0"
+        scrolling="no"
+        @load="adjustIframeHeight"
+      )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
section#acr-report
h1.heading-corner Full Report
iframe#acr-iframe(src="/acr/acr.html" frameborder="0" scrolling="no" onload="this.style.height = this.contentWindow.document.documentElement.scrollHeight + 'px';")
section#acr-report
h1.heading-corner Full Report
iframe#acr-iframe(
src="/acr/acr.html"
title="Accessibility Conformance Report"
frameborder="0"
scrolling="no"
@load="adjustIframeHeight"
)

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
app/views/acr/ACRView.vue (1)

36-36: 🛠️ Refactor suggestion

Enhance iframe height management.

The current inline onload handler for managing iframe height should be moved to a proper Vue method for better maintainability and error handling.

Apply this diff to improve the iframe implementation:

-      iframe#acr-iframe(src="/acr/acr.html" frameborder="0" scrolling="no" onload="this.style.height = this.contentWindow.document.documentElement.scrollHeight + 'px';" title="Accessibility Conformance Report")
+      iframe#acr-iframe(
+        src="/acr/acr.html"
+        title="Accessibility Conformance Report"
+        frameborder="0"
+        scrolling="no"
+        @load="adjustIframeHeight"
+      )

Add the following method to handle iframe height adjustment:

methods: {
  adjustIframeHeight(event) {
    try {
      const iframe = event.target;
      iframe.style.height = `${iframe.contentWindow.document.documentElement.scrollHeight}px`;
    } catch (error) {
      console.error('Error adjusting iframe height:', error);
    }
  }
}
🧹 Nitpick comments (2)
app/views/acr/ACRView.vue (2)

4-12: Remove empty component structure if not needed.

The component contains empty components, data, and methods sections. If these aren't needed, they should be removed for better code maintainability.

Apply this diff to simplify the component structure:

 export default {
   name: 'ACR',
-  components: {
-  },
-
-  data: () => ({
-  }),
-
-  methods: {
-  },
 }

185-185: Remove trailing whitespace.

There is a trailing whitespace after img.logo-image.

Apply this diff to fix the whitespace:

-    img.logo-image { 
+    img.logo-image {
🧰 Tools
🪛 ESLint

[error] 185-185: Trailing spaces not allowed.

(no-trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4549b1e and aaf472b.

📒 Files selected for processing (5)
  • app/components/common/Footer.vue (1 hunks)
  • app/components/common/Navigation.vue (3 hunks)
  • app/locale/en.js (2 hunks)
  • app/views/acr/ACRView.vue (1 hunks)
  • app/views/schools/PageSchools.vue (1 hunks)
🧰 Additional context used
🪛 ESLint
app/views/acr/ACRView.vue

[error] 185-185: Trailing spaces not allowed.

(no-trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: ESLint CI
  • GitHub Check: Node.js CI (18.10.0)
🔇 Additional comments (6)
app/locale/en.js (3)

439-439: LGTM: Added new navigation item for accessibility

The addition of the accessibility navigation item with a link to ACR/VPAT is a good practice for improving site accessibility and compliance information.


5653-5655: LGTM: Added accessibility ACR prefix, link text and suffix

The addition of these accessibility-related strings provides clear information about WCAG 2.1 Level AA and Revised Section 508 Standards compliance.


5653-5655: Verify accessibility link functionality

Let's verify that the ACR/VPAT link is properly implemented and accessible.

app/components/common/Footer.vue (1)

104-104: LGTM!

The addition of the accessibility link in the footer with country-based filtering is well implemented.

app/views/schools/PageSchools.vue (1)

435-441: LGTM!

The addition of the accessibility information and ACR link is well integrated into the schools page.

app/components/common/Navigation.vue (1)

38-38: LGTM!

Good improvements:

  • Added accessibility navigation item
  • Fixed typo in variable name (teacherCocoCllassesteacherCocoClasses)

Also applies to: 302-302, 312-312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants