Skip to content
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

Add Opacity Overlay to Hero Background Image for Improved Readability #559

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

jeromehardaway
Copy link
Contributor

This PR introduces an overlay with rgba(9, 31, 64, 0.5) background color on top of the hero area's background image. The goal of this change is to dim the background image slightly, enhancing the readability of text and the visibility of other elements in the hero area.

Changes Made:

  • Added a <div> with inline styles for backgroundColor: rgba(9, 31, 64, 0.5) and absolute positioning. This div serves as an overlay on the hero background image, ensuring that the image is dimmed without affecting the opacity of the content on top.
  • Ensured that the overlay covers the entire area of the background image by setting its position to absolute and extending it to all corners of the container.

Rationale:
The background image of the hero area, while visually appealing, can sometimes make the overlaying text and buttons hard to read, especially when there's significant variance in the image's brightness and color. By introducing a semi-transparent overlay, we create a more uniform background that improves text visibility and the overall user experience.

Testing:

  • Visual tests were conducted across multiple screen sizes to ensure the overlay correctly covers the entire background image without affecting the hero area's content.
  • Tested the responsiveness to ensure that the overlay adapts correctly to different screen sizes and orientations.

This enhancement is a step towards improving the accessibility and usability of our web presence, ensuring that our content is clear and accessible to all users.

Copy link

vercel bot commented Mar 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vets-who-code-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 17, 2024 1:15am

@jeromehardaway
Copy link
Contributor Author

This pull request includes changes to the HeroArea component in src/containers/hero/layout-04/index.tsx. The changes introduce an overlay to the hero image and include a conditional rendering for a video modal.

Changes to HeroArea component:

@jeromehardaway jeromehardaway merged commit 6b086f4 into master Mar 17, 2024
3 checks passed
@jeromehardaway jeromehardaway deleted the IndexHeroAccessibilityFix branch March 17, 2024 01:16
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.

1 participant