1. 12 Oct, 2020 3 commits
    • Emmanuele Bassi's avatar
      a11y: Compute the label for a GtkATContext · 21482e82
      Emmanuele Bassi authored
      The ARIA spec defines the mechanism for determining the name of an
      accessible element—see §4.3 of the WAI-ARIA spec.
      
      We follow the specification as much as it makes sense for GTK to do
      so:
      
       1. if the element is hidden, return an empty string
       1. if the element has a labelled-by relation set, retrieve the
          label of the related element
       2. if the element has a label property set, use the value of
          the property
       3. if neither labelled-by nor label attributes are set, we use
          the role to compute the name:
         - for a `range` role, we return the contents of the value of
           the `value-text` or `value-now` properties
         - for any other role, we return a textual representation of
           the GtkAccessibleRole enumeration value
      21482e82
    • Emmanuele Bassi's avatar
      a11y: Add a display to GtkATContext · 8c184800
      Emmanuele Bassi authored
      Since we need to check at run time what kind of AT context to use, we
      need a hook into the whole GDK backend machinery. The display connection
      seems to be the best choice, in this case, as it allows us to determine
      whether we're running on an X11 or Wayland system, and thus whether we
      should create a GtkAtSpiContext.
      
      This requires some surgery to fix the GtkATContext creation function, in
      order to include a GdkDisplay instance.
      8c184800
    • Emmanuele Bassi's avatar
      a11y: Add dummy AT-SPI context · 8f19bb08
      Emmanuele Bassi authored
      Does not do anything, at the moment, but it's going to get filled out
      soon.
      
      The backend is selected depending on the platform being compiled in;
      since we're using AT-SPI on X11 and Wayland, and we don't have other
      accessibility implementations, we currently don't care about run time
      selection, but we're going to have to deal with that.
      8f19bb08
  2. 28 Aug, 2020 3 commits
  3. 25 Aug, 2020 3 commits
  4. 05 Aug, 2020 1 commit
  5. 30 Jul, 2020 1 commit
  6. 29 Jul, 2020 1 commit
  7. 28 Jul, 2020 1 commit
  8. 27 Jul, 2020 1 commit
  9. 26 Jul, 2020 7 commits
    • Emmanuele Bassi's avatar
      a11y: Add API to retrieve accessible values · b9a1cb74
      Emmanuele Bassi authored
      We are going to use this for implementing ATContext subclasses, but also
      in the testing API.
      b9a1cb74
    • Emmanuele Bassi's avatar
      a11y: Change default accessible role · 03b773f4
      Emmanuele Bassi authored
      Only GtkWidget should use GTK_ACCESSIBLE_ROLE_WIDGET as its default
      accessible role; the default for GtkAccessible and GtkATContext should
      be GTK_ACCESSIBLE_ROLE_NONE, meaning "an element whose implicit native
      role semantics will not be mapped to the accessibility API", according
      to the WAI-ARIA specification.
      03b773f4
    • Emmanuele Bassi's avatar
      a11y: Add testing API · 0d87f8cd
      Emmanuele Bassi authored
      We want to test the accessibility API, as well as the implementation
      inside each widget. For that, we should expose an API that lets us
      verify that a GtkAccessible has a given role, as well as a given
      property.
      
      The API follows the pattern of other GTest API:
      
       - a macro to assert that a condition is respected
       - a function that prints out the error message in case of failure
      0d87f8cd
    • Emmanuele Bassi's avatar
      a11y: Consolidate the attributes container · 732578eb
      Emmanuele Bassi authored
      While we have split the various attributes for convenience, there's no
      reason why we should have specialised data types for the attributes
      container object.
      732578eb
    • Emmanuele Bassi's avatar
      a11y: Add relations API · 1124f250
      Emmanuele Bassi authored
      Since we split relation attributes from the generic properties, we need
      to add API for setting and retrieving their values.
      1124f250
    • Emmanuele Bassi's avatar
      Add accessible properties to GtkAccessible · da1ce01a
      Emmanuele Bassi authored
      We propagate the accessible state and properties to each ATContext in
      the same virtual function, since they are functionally similar.
      da1ce01a
    • Emmanuele Bassi's avatar
      Add GtkATContext · a382dfd3
      Emmanuele Bassi authored
      The ATContext type is meant to be used as the base class for
      implementations of the assistive technology API—the actual mechanism
      needed to communicate to components like the screen reader, or any other
      AT.
      
      Every time the widget state changes, the ATContext is meant to broadcast
      the state change; and every time the AT queries the state of a UI
      element, the ATContext is meant to provide that information.
      
      We also have a "test" ATContext implementation, which is meant to be
      used to write tests to verify that changes are propagated without
      requiring a whole desktop session.
      a382dfd3