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

static/Alert.jsx: refactor #1735

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

hom3mad3
Copy link
Contributor

@hom3mad3 hom3mad3 commented Dec 17, 2024

Refactored the Alert component to improve semantics by removing unnecessary attributes, such as aria-live, and appropriately handling role="status" for success and warning messages, while using role="alert" for critical notifications. Reverted back to the .alert class to prevent unintended impacts on other repositories and reduce overhead.

@hom3mad3 hom3mad3 requested review from goapunk and vellip December 17, 2024 18:01
@@ -309,8 +310,7 @@ export default class Comment extends React.Component {

return (
<li>
{this.props.displayNotification &&
<div className="alert alert--success a4-comments__success-notification"><i className="fas fa-check" /> {translated.successMessage}</div>}
Copy link
Contributor Author

@hom3mad3 hom3mad3 Dec 17, 2024

Choose a reason for hiding this comment

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

this icon is such an edge case that i removed it (also inconsistently used)

@hom3mad3 hom3mad3 merged commit 3c1628f into main Dec 18, 2024
5 checks passed
@hom3mad3 hom3mad3 deleted the mr-2024-12-mb-redesign-alerts-fix branch December 18, 2024 13:52
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