Skip to content

Conversation

@MritunjayTiwari14
Copy link
Contributor

@MritunjayTiwari14 MritunjayTiwari14 commented Nov 3, 2025

Fixes #1961.

Changes Displayed using SemanticsDebugger widget (Updated)

### Semantic Label of orDivider changed

Before(Turned Off Debugger) Before(Turned On Debugger) After(Turned On Debugger)
1000053717 1000053719 Screenshot_20251130_191304

Other than the orDivider, all the semantic label seems to be in ideal condition in login page as tested and is visually represented in the semantic tree in the screenshot provided.

@MritunjayTiwari14 MritunjayTiwari14 changed the title login: Fix orDivider semantic label login: Clarify semantic label for orDivider Nov 3, 2025
@MritunjayTiwari14 MritunjayTiwari14 changed the title login: Clarify semantic label for orDivider login: Clarify semantics Nov 30, 2025
@MritunjayTiwari14 MritunjayTiwari14 changed the title login: Clarify semantics login: Clarify semantics on page Nov 30, 2025
Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

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

Thanks! Comments below.

Comment on lines 766 to 769
"loginMethodDividerSemanticLabel": "Log-in alternatives",
"@loginMethodDividerSemanticLabel": {
"description": "Semantic label for OrDivider in login page."
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: indentation

},
"loginMethodDividerSemanticLabel": "Log-in alternatives",
"@loginMethodDividerSemanticLabel": {
"description": "Semantic label for OrDivider in login page."
Copy link
Collaborator

Choose a reason for hiding this comment

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

"OrDivider" is about something in the code, and we don't expect our volunteer translators to read the code. We should describe the string in a way that will make sense to the translators.

onPressed: widget.loginPageState._inProgress ? null : _submit,
child: Text(zulipLocalizations.loginFormSubmitLabel)),
])));
return Semantics(
Copy link
Collaborator

Choose a reason for hiding this comment

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

How did you decide this Semantics was necessary? From a quick skim of the implementation of the upstream Form widget, it looks like this is already taken care of:

    return Semantics(
      container: true,
      explicitChildNodes: true,
      role: SemanticsRole.form,
      child: form,
    );

Copy link
Contributor Author

Choose a reason for hiding this comment

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

noted.

final externalAuthenticationMethods = widget.serverSettings.externalAuthenticationMethods;

final loginForm = Column(mainAxisAlignment: MainAxisAlignment.center, children: [
final loginOption = Column(mainAxisAlignment: MainAxisAlignment.center, children: [
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand the reason for this renaming. The commit message says the new name is "more explicit". What's less explicit about the old name? Also, the new name is confusing: it sounds like it's about only one login method ("option"), but the variable configures the UI for multiple login methods: username-password, plus any others the server offers, such as Google or GitHub.

I guess the old name could be confusing because it's too specific: only part of its job is about a "form", i.e., the username-password form. The third-party auth buttons aren't part of any form. If you want to change the name, I think "content" would be fine. It encompasses all of the variable's job, and it reads nicely alongside its ancestor widgets that are about how the content is presented (ConstrainedBox, SingleChildScrollView, SafeArea, etc.).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also a commit-message nit: renaming this variable seems unrelated to #1961. Let's move the Fixes line to the earlier commit that actually fixes that issue.

@MritunjayTiwari14
Copy link
Contributor Author

Thank you @chrisbobbe for the review, pushed the new changed. PTAL.

Copilot finished reviewing on behalf of MritunjayTiwari14 December 4, 2025 08:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves accessibility on the login page by adding a semantic label to the OrDivider widget that separates username/password login from third-party authentication options. The changes ensure screen readers provide meaningful context about the alternative login methods.

  • Added Semantics widget to the OrDivider with excludeSemantics: true to prevent child widgets from being read separately
  • Introduced new localization string loginMethodDividerSemanticLabel across all supported languages
  • Renamed loginForm variable to loginContent for better clarity

Reviewed changes

Copilot reviewed 2 out of 20 changed files in this pull request and generated no comments.

File Description
lib/widgets/login.dart Wraps OrDivider content in Semantics widget with new semantic label; renames loginForm to loginContent
lib/generated/l10n/zulip_localizations.dart Adds abstract getter for loginMethodDividerSemanticLabel with documentation
assets/l10n/app_en.arb Defines base English semantic label "Log-in alternatives" with description
lib/generated/l10n/zulip_localizations_*.dart (16 files) Implements loginMethodDividerSemanticLabel getter for each language (currently untranslated)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Clarify semantics on login options

2 participants