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

[Fabric] Add Support for ITextProvider, ITextProvider2, and ITextRangeProvider #14332

Merged
merged 20 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "ITextProvider Implementation",
"packageName": "react-native-windows",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ exports[`Accessibility Tests Components can store range data by setting the min,
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "The View's (accessibilityRole == adjustable, ie. Slider) properties should be the following according to UIA: Min- 5Max- 125Now- 10",
"TextRangePattern.GetText": "The View's (accessibilityRole == adjustable, ie. Slider) properties should be the following according to UIA: Min- 5Max- 125Now- 10",
},
],
},
Expand Down Expand Up @@ -73,6 +74,7 @@ exports[`Accessibility Tests Components can store value data by setting the text
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "The View's properties should be the following according to UIA: Text- testText",
"TextRangePattern.GetText": "The View's properties should be the following according to UIA: Text- testText",
},
],
},
Expand Down Expand Up @@ -129,6 +131,7 @@ exports[`Accessibility Tests Elements can set accessibilityState:selected to fal
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Unselected",
"TextRangePattern.GetText": "Unselected",
},
],
},
Expand Down Expand Up @@ -187,6 +190,7 @@ exports[`Accessibility Tests Elements can set accessibilityState:selected to tru
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Selected",
"TextRangePattern.GetText": "Selected",
},
],
},
Expand Down Expand Up @@ -252,6 +256,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Unselected",
"TextRangePattern.GetText": "Unselected",
},
],
},
Expand All @@ -267,6 +272,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Unselected",
"TextRangePattern.GetText": "Unselected",
},
],
},
Expand All @@ -282,6 +288,7 @@ exports[`Accessibility Tests Selectable items must have a Selection Container. E
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Unselected",
"TextRangePattern.GetText": "Unselected",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exports[`Button Tests Buttons can be disabled 1`] = `
"IsEnabled": false,
"LocalizedControlType": "text",
"Name": "Submit Application",
"TextRangePattern.GetText": "Submit Application",
},
],
},
Expand Down Expand Up @@ -162,6 +163,7 @@ exports[`Button Tests Buttons can have accessibility labels 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Submit Application",
"TextRangePattern.GetText": "Submit Application",
},
],
},
Expand Down Expand Up @@ -310,6 +312,7 @@ exports[`Button Tests Buttons can have accessibility props 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Submit Application",
"TextRangePattern.GetText": "Submit Application",
},
],
},
Expand Down Expand Up @@ -440,6 +443,7 @@ exports[`Button Tests Buttons can have accessibility states 1`] = `
"IsEnabled": false,
"LocalizedControlType": "text",
"Name": "Submit Application",
"TextRangePattern.GetText": "Submit Application",
},
],
},
Expand Down Expand Up @@ -587,6 +591,7 @@ exports[`Button Tests Buttons can have custom colors 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Cancel Application",
"TextRangePattern.GetText": "Cancel Application",
},
],
},
Expand Down Expand Up @@ -849,6 +854,7 @@ exports[`Button Tests Buttons can have custom focusable and accessible props 2`]
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Button with focusable=false",
"TextRangePattern.GetText": "Button with focusable=false",
},
],
},
Expand Down Expand Up @@ -1098,6 +1104,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Cancel",
"TextRangePattern.GetText": "Cancel",
},
],
},
Expand All @@ -1113,6 +1120,7 @@ exports[`Button Tests Buttons can have flexbox styling 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Submit",
"TextRangePattern.GetText": "Submit",
},
],
},
Expand Down Expand Up @@ -1424,6 +1432,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Cancel",
"TextRangePattern.GetText": "Cancel",
},
],
},
Expand All @@ -1439,6 +1448,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Save For Later",
"TextRangePattern.GetText": "Save For Later",
},
],
},
Expand All @@ -1454,6 +1464,7 @@ exports[`Button Tests Buttons can have flexbox styling with three buttons 1`] =
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Submit",
"TextRangePattern.GetText": "Submit",
},
],
},
Expand Down Expand Up @@ -1894,6 +1905,7 @@ exports[`Button Tests Buttons have default styling 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Submit Application",
"TextRangePattern.GetText": "Submit Application",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ exports[`Image Tests An Image can be nested inside of a component 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "React",
"TextRangePattern.GetText": "React",
},
],
},
Expand Down Expand Up @@ -1137,18 +1138,21 @@ exports[`Image Tests An Image can have a tint color 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "It also works using the \`tintColor\` style prop",
"TextRangePattern.GetText": "It also works using the \`tintColor\` style prop",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "The \`tintColor\` prop has precedence over the \`tintColor\` style prop",
"TextRangePattern.GetText": "The \`tintColor\` prop has precedence over the \`tintColor\` style prop",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "It also works with downloaded images:",
"TextRangePattern.GetText": "It also works with downloaded images:",
},
],
},
Expand Down Expand Up @@ -2174,60 +2178,70 @@ exports[`Image Tests An Image customized how it is rendered within the frame usi
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Contain",
"TextRangePattern.GetText": "Contain",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Cover",
"TextRangePattern.GetText": "Cover",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Fill",
"TextRangePattern.GetText": "Fill",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Scale Down",
"TextRangePattern.GetText": "Scale Down",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "None",
"TextRangePattern.GetText": "None",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Contain",
"TextRangePattern.GetText": "Contain",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Cover",
"TextRangePattern.GetText": "Cover",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Fill",
"TextRangePattern.GetText": "Fill",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Scale Down",
"TextRangePattern.GetText": "Scale Down",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "None",
"TextRangePattern.GetText": "None",
},
],
},
Expand Down Expand Up @@ -3162,72 +3176,84 @@ exports[`Image Tests Images have multiple resize modes 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Contain",
"TextRangePattern.GetText": "Contain",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Cover",
"TextRangePattern.GetText": "Cover",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Stretch",
"TextRangePattern.GetText": "Stretch",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Repeat",
"TextRangePattern.GetText": "Repeat",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Center",
"TextRangePattern.GetText": "Center",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "None",
"TextRangePattern.GetText": "None",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Contain",
"TextRangePattern.GetText": "Contain",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Cover",
"TextRangePattern.GetText": "Cover",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Stretch",
"TextRangePattern.GetText": "Stretch",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Repeat",
"TextRangePattern.GetText": "Repeat",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Center",
"TextRangePattern.GetText": "Center",
},
{
"AutomationId": "",
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "None",
"TextRangePattern.GetText": "None",
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`LegacySelectableTextTest DoubleClickWhenNotSelectable 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Pressed: 2 times.",
"TextRangePattern.GetText": "Pressed: 2 times.",
},
"Component Tree": {
"Type": "Microsoft.ReactNative.Composition.ParagraphComponentView",
Expand All @@ -30,6 +31,7 @@ exports[`LegacySelectableTextTest DoubleClickWhenSelectable 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Pressed: 2 times.",
"TextRangePattern.GetText": "Pressed: 2 times.",
},
"Component Tree": {
"Type": "Microsoft.ReactNative.Composition.ParagraphComponentView",
Expand All @@ -53,6 +55,7 @@ exports[`LegacySelectableTextTest PressableWhenNotSelectable 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Pressed: 1 times.",
"TextRangePattern.GetText": "Pressed: 1 times.",
},
"Component Tree": {
"Type": "Microsoft.ReactNative.Composition.ParagraphComponentView",
Expand All @@ -76,6 +79,7 @@ exports[`LegacySelectableTextTest PressableWhenSelectable 1`] = `
"ControlType": 50020,
"LocalizedControlType": "text",
"Name": "Pressed: 1 times.",
"TextRangePattern.GetText": "Pressed: 1 times.",
},
"Component Tree": {
"Type": "Microsoft.ReactNative.Composition.ParagraphComponentView",
Expand Down
Loading
Loading