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

More Semantics properties #2731

Merged
merged 13 commits into from
Mar 2, 2024
Merged

More Semantics properties #2731

merged 13 commits into from
Mar 2, 2024

Conversation

ndonkoHenri
Copy link
Collaborator

@ndonkoHenri ndonkoHenri commented Feb 23, 2024

Closes #1498

  • eventData in triggerControlEvent defaults to ""
  • Expose more Semantics properties
  • SemanticsService

Test code for SemanticsService:

import flet as ft


def main(page):
    page.window_always_on_top = True
    page.theme_mode = ft.ThemeMode.LIGHT
    page.horizontal_alignment = ft.CrossAxisAlignment.CENTER

    s = ft.SemanticsService()
    page.overlay.append(s)
    page.update()

    page.add(
        ft.OutlinedButton(
            text="Announce Tooltip",
            on_click=lambda e: s.announce_tooltip("This is a tooltip announcement"),
        ),
        ft.OutlinedButton(
            text="Announce Message",
            on_click=lambda e: s.announce_tooltip("This is a message announcement"),
        ),
    )


ft.app(target=main)

@FeodorFitsner
Copy link
Contributor

What about SemanticsService as a 3rd-option in your list?

@FeodorFitsner
Copy link
Contributor

Great PR! Accessibility is a must for a good UI framework!

@ndonkoHenri
Copy link
Collaborator Author

ndonkoHenri commented Feb 29, 2024

What about SemanticsService as a 3rd-option in your list?

Will be adding it soon...

# Conflicts:
#	packages/flet_video/lib/src/video.dart
#	sdk/python/packages/flet-core/src/flet_core/icon.py
#	sdk/python/packages/flet-core/src/flet_core/semantics.py
@FeodorFitsner FeodorFitsner merged commit f3b8b33 into main Mar 2, 2024
2 checks passed
@ndonkoHenri ndonkoHenri deleted the semantics branch March 2, 2024 22:40
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
* semantics initial commit

* getters and setters

* reformat: eventData in triggerControlEvent defaults to ""

* reformat: eventData in triggerControlEvent defaults to ""

* Semantics: textfield, image, header, link

* semantics_label: AlertDialog, CupertinoTextField, Icon

* MergeSemantics

* SemanticsService: initial commit

* SemanticsService: use self.invoke_method

* SemanticsService: cleanup

---------

Co-authored-by: Feodor Fitsner <feodor@appveyor.com>
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.

Expand Semantics and SemanticsService support
2 participants