Open
Conversation
Imran-imtiaz48
left a comment
There was a problem hiding this comment.
The changes focus on maintaining consistency within the "View Our Menu" button. The button includes two spans for text: text-1 (visible) and text-2 (hidden but accessible). This structure ensures both accessibility and smooth animations for the user experience.
Pros:
- Semantic HTML: The use of aria-hidden="true" is a good accessibility practice, ensuring that the second span is hidden from screen readers while still serving its visual function.
- Consistent Styling: The double span approach is clear, and using the same text for both ensures that the design is aligned.
- Good Structure: The button itself is well-structured with a primary btn btn-primary slider-reveal class, ensuring consistent behavior across the site.
Suggestions for Improvement:
• DRY Principle: If the exact same button structure is repeated multiple times, consider creating a reusable component or partial (depending on your framework) to avoid repetition and make future changes easier to manage.
• ARIA-Labelling: To enhance accessibility further, you could use an aria-label on the button itself, which can be a cleaner way of providing accessibility than relying on a hidden span.
Overall, this is well-done and functional for the purpose, especially regarding accessibility and design.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Done now its working you didnt given Href link