Skip to content

feat: autocomplete API expansion and NiceButton accessibility#29

Merged
nord- merged 3 commits into
masterfrom
feat/minor-batch
Jun 10, 2026
Merged

feat: autocomplete API expansion and NiceButton accessibility#29
nord- merged 3 commits into
masterfrom
feat/minor-batch

Conversation

@nord-

@nord- nord- commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Samlar minor-issuesen #20, #19 och #15.

#20 — LabeledAutoCompleteEntry vidarebefordrar nu hela det meningsfulla API:t

Tillagda vidarebefordrade properties (defaults matchar inre LabeledEntry/LabelBase): FontSize, PlaceholderColor, IsPassword, IsReadOnly, SelectAllOnFocus, Example, ContentPadding, Unit, UnitFontFamily, UnitFontSize, UnitColor. Demon visar Example på kontrollen.

#19 — korrekt text vid val av komplext förslag

Ny SuggestionTextSelector (Func<object, string>) som plockar strängvärdet ur valt objekt. Faller tillbaka på ToString() när den inte är satt (oförändrat beteende för strängförslag).

#15 — tillgänglighet på NiceButton

  • Ny SemanticDescription-property; SemanticProperties.Description sätts automatiskt från SemanticDescription ?? Text, så text-knappar läses upp utan extra konfig och ikon-only-knappar får en dokumenterad väg till tillgängligt namn.
  • Knapp-roll via handler-mappers (filtrerade på NiceButton): Android AccessibilityNodeInfo.ClassName = android.widget.Button, iOS UIAccessibilityTraits.Button.

Bygger rent (0 varningar/fel) för net10.0-android + net10.0-ios, och demoappen bygger.

⚠️ Skärmläsar-rollen (#15) är verifierad att kompilera men bör bekräftas på fysisk enhet med TalkBack/VoiceOver.

Closes #20
Closes #19
Closes #15

Rickard Nord added 2 commits June 10, 2026 15:45
Forward the remaining meaningful LabeledEntry/LabelBase properties (FontSize, PlaceholderColor, IsPassword, IsReadOnly, SelectAllOnFocus, Example, ContentPadding, Unit/UnitFontFamily/UnitFontSize/UnitColor) with defaults matching the inner control. (#20)

Add SuggestionTextSelector (Func<object,string>) so complex suggestion objects commit the intended text instead of ToString(); falls back to ToString() when unset. (#19)

Demo shows the new Example property on the autocomplete control.

Closes #20

Closes #19
Announce NiceButton as a button to TalkBack/VoiceOver via handler mappers (Android: AccessibilityNodeInfo.ClassName = android.widget.Button; iOS: UIAccessibilityTraits.Button). The accessible name comes from a new SemanticDescription property, falling back to Text so text buttons need no extra config and icon-only buttons have a documented way to get a name.

Closes #15
Copilot AI review requested due to automatic review settings June 10, 2026 13:46
@nord- nord- added the minor label Jun 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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 expands the public API surface of LabeledAutoCompleteEntry to better match the composed LabeledEntry/LabelBase, improves committed text behavior when selecting complex suggestion objects, and adds accessibility semantics support for NiceButton (button role + accessible name defaults). It also updates the demo app to showcase one of the new forwarded properties.

Changes:

  • Forward additional LabeledEntry/LabelBase-style bindable properties from LabeledAutoCompleteEntry (e.g., FontSize, PlaceholderColor, Example, ContentPadding, unit-related properties).
  • Add SuggestionTextSelector to control how selected suggestion objects are converted into committed text (fallback to ToString()).
  • Add NiceButton.SemanticDescription and platform mappings to expose a button role and default accessible description behavior.

Reviewed changes

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

File Description
NiceEntryDemoApp/MainPage.xaml Demonstrates the new Example property on LabeledAutoCompleteEntry.
NiceEntry/NiceButton.cs Adds accessibility role mapping and a SemanticDescription API for screen readers.
NiceEntry/LabeledAutoCompleteEntry.xaml.cs Adds forwarded bindable properties and SuggestionTextSelector for committed suggestion text.

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

Comment thread NiceEntry/LabeledAutoCompleteEntry.xaml.cs
Comment thread NiceEntry/NiceButton.cs
Give LabeledAutoCompleteEntry.ContentPadding the same platform-specific default as LabelBase so the wrapper honors the same-defaults contract instead of defaulting to Thickness(0).

Attach a tap recognizer to the NiceButton layout root, which is the single accessibility element, so screen-reader activation reaches OnTapped. The _tapInFlight guard prevents a sighted tap from firing the command twice.
@nord- nord- merged commit 9bd83d0 into master Jun 10, 2026
1 check passed
@nord- nord- deleted the feat/minor-batch branch June 10, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

2 participants