Use EditInPlace control for Identity Server picker to improve a11y (#29280)

* Use EditInPlace for identity server picker.

* Exclude picker from default dialog button styles.

* Remove unused import.

* Update test

* Remove unused css

* Update test

* drop only

* Add a test for setting an ID server.

* Add a unit test for SetIdServer

* fix tests

* Reformat mx_Dialog button :not list to use a more readable selector.

* Reformat other :not sections

* forgot a comma

* We're in 2025 now.

* Update copyright + use class methods.
This commit is contained in:
Will Hunt
2025-02-21 13:18:14 +00:00
committed by GitHub
parent 2e1798edc4
commit 22943ee06a
9 changed files with 309 additions and 129 deletions
@@ -0,0 +1,54 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<SetIdServer /> renders expected fields 1`] = `
<DocumentFragment>
<fieldset
class="mx_SettingsFieldset"
>
<legend
class="mx_SettingsFieldset_legend"
>
Identity server
</legend>
<div
class="mx_SettingsFieldset_description"
>
<div
class="mx_SettingsSubsection_text"
>
You are not currently using an identity server. To discover and be discoverable by existing contacts you know, add one below.
</div>
</div>
<div
class="mx_SettingsFieldset_content"
>
<form
class="_root_ssths_24 mx_IdentityServerPicker"
>
<div
class="_field_ssths_34"
>
<label
class="_label_ssths_67"
for="radix-:r0:"
>
Enter a new identity server
</label>
<div
class="_controls_1h4nb_17"
>
<input
class="_control_9gon8_18"
id="radix-:r0:"
name="input"
placeholder=""
title=""
value=""
/>
</div>
</div>
</form>
</div>
</fieldset>
</DocumentFragment>
`;