[a11y] (5/8)Move Semantics & Settings Manager to lib/

This is the CL-5 in the long chain(Total 8) of CLs. This cl depends on
https://fuchsia-review.googlesource.com/c/fuchsia/+/302018 for review.

This cl does following things:
1. moves code of semantics manager from bin/a11y_manager/semantic/ to lib/semantics/
2. moves code of settings manager from bin/a11y_manager/settings/ to lib/settings/
4. moves code of util from bin/a11y_manager/ to lib/util/
5. Updates BUILD files to support step 1 and 2.
6. Moved tests for semantics manager and settings manager from
a11y/tests/integration to a11y/lib/semantics/tests and
a11y/lib/settings/tests respectively.
7.Update Build files in lib/ so that "fx run_test a11y_lib_tests" will
also run tests for semantics/ and settings/

To run new tests: fx run_test a11y_lib_tests
This will run tests for semantics manager, settings manager, tts,
gesture, etc.

MI4-2643 #comment

Testing:
  * Build: Passed
  * Unit Test:
       fx run_test a11y_lib_tests (Passed)
       fx run_test a11y_tests     (Passed)

Change-Id: I7d74ded49c34bd65ac0307567b7f76738487d255
diff --git a/garnet/packages/tests/BUILD.gn b/garnet/packages/tests/BUILD.gn
index 064395f..cd551b8 100644
--- a/garnet/packages/tests/BUILD.gn
+++ b/garnet/packages/tests/BUILD.gn
@@ -1345,7 +1345,7 @@
 group("a11y") {
   testonly = true
   public_deps = [
-    "//src/ui/a11y/tests:tests",
+    "//src/ui/a11y/bundles:tests",
   ]
 }
 
diff --git a/src/ui/a11y/BUILD.gn b/src/ui/a11y/BUILD.gn
index dde8ef5..0de9e4f 100644
--- a/src/ui/a11y/BUILD.gn
+++ b/src/ui/a11y/BUILD.gn
@@ -5,5 +5,6 @@
 group("a11y") {
   deps = [
     "bin/a11y_manager",
+    "lib",
   ]
 }
diff --git a/src/ui/a11y/bin/a11y_manager/BUILD.gn b/src/ui/a11y/bin/a11y_manager/BUILD.gn
index f01e429..5c970ce 100644
--- a/src/ui/a11y/bin/a11y_manager/BUILD.gn
+++ b/src/ui/a11y/bin/a11y_manager/BUILD.gn
@@ -45,22 +45,15 @@
   sources = [
     "app.cc",
     "app.h",
-    "semantics/semantic_tree_impl.cc",
-    "semantics/semantic_tree_impl.h",
-    "semantics/semantics_manager_impl.cc",
-    "semantics/semantics_manager_impl.h",
-    "settings/settings_manager_impl.cc",
-    "settings/settings_manager_impl.h",
-    "settings/settings_provider_impl.cc",
-    "settings/settings_provider_impl.h",
-    "util.cc",
-    "util.h",
   ]
 
   public_deps = [
     "//sdk/fidl/fuchsia.accessibility",
     "//sdk/fidl/fuchsia.accessibility.semantics",
     "//sdk/fidl/fuchsia.math",
+    "//src/ui/a11y/lib/screen_reader",
+    "//src/ui/a11y/lib/semantics",
+    "//src/ui/a11y/lib/settings",
   ]
 
   deps = [
diff --git a/src/ui/a11y/bin/a11y_manager/app.cc b/src/ui/a11y/bin/a11y_manager/app.cc
index f5b2156..fde4fe3 100644
--- a/src/ui/a11y/bin/a11y_manager/app.cc
+++ b/src/ui/a11y/bin/a11y_manager/app.cc
@@ -13,8 +13,8 @@
 
 App::App(std::unique_ptr<sys::ComponentContext> context)
     : startup_context_(std::move(context)),
-      settings_manager_impl_(std::make_unique<SettingsManagerImpl>()),
-      semantics_manager_impl_(std::make_unique<SemanticsManagerImpl>()) {
+      settings_manager_impl_(std::make_unique<a11y::SettingsManagerImpl>()),
+      semantics_manager_impl_(std::make_unique<a11y::SemanticsManagerImpl>()) {
   Initialize();
 }
 
diff --git a/src/ui/a11y/bin/a11y_manager/app.h b/src/ui/a11y/bin/a11y_manager/app.h
index d029e0e..8208710 100644
--- a/src/ui/a11y/bin/a11y_manager/app.h
+++ b/src/ui/a11y/bin/a11y_manager/app.h
@@ -14,9 +14,9 @@
 #include "lib/fidl/cpp/binding_set.h"
 #include "src/lib/fxl/logging.h"
 #include "src/lib/fxl/macros.h"
-#include "src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.h"
-#include "src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.h"
 #include "src/ui/a11y/lib/screen_reader/screen_reader.h"
+#include "src/ui/a11y/lib/semantics/semantics_manager_impl.h"
+#include "src/ui/a11y/lib/settings/settings_manager_impl.h"
 
 namespace a11y_manager {
 
@@ -46,9 +46,9 @@
   std::unique_ptr<sys::ComponentContext> startup_context_;
 
   // Pointer to Settings Manager Implementation.
-  std::unique_ptr<SettingsManagerImpl> settings_manager_impl_;
+  std::unique_ptr<a11y::SettingsManagerImpl> settings_manager_impl_;
   // Pointer to Semantics Manager Implementation.
-  std::unique_ptr<SemanticsManagerImpl> semantics_manager_impl_;
+  std::unique_ptr<a11y::SemanticsManagerImpl> semantics_manager_impl_;
 
   fidl::BindingSet<fuchsia::accessibility::SettingsWatcher> settings_watcher_bindings_;
 
diff --git a/src/ui/a11y/tests/integration/BUILD.gn b/src/ui/a11y/bin/a11y_manager/tests/BUILD.gn
similarity index 73%
copy from src/ui/a11y/tests/integration/BUILD.gn
copy to src/ui/a11y/bin/a11y_manager/tests/BUILD.gn
index 1dde56f8..fb56b6d 100644
--- a/src/ui/a11y/tests/integration/BUILD.gn
+++ b/src/ui/a11y/bin/a11y_manager/tests/BUILD.gn
@@ -1,12 +1,26 @@
 # Copyright 2019 The Fuchsia Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
+#
+import("//build/test/test_package.gni")
 
 group("tests") {
   testonly = true
-  public_deps = [
+  deps = [
+    ":a11y_tests",
+  ]
+}
+
+test_package("a11y_tests") {
+  deps = [
     ":a11y_manager_apptests",
   ]
+  tests = [
+    {
+      name = "a11y_manager_apptests"
+      environments = basic_envs
+    },
+  ]
 }
 
 executable("a11y_manager_apptests") {
@@ -16,11 +30,6 @@
 
   sources = [
     "app_unittest.cc",
-    "semantic_tree_parser.cc",
-    "semantic_tree_parser.h",
-    "semantic_tree_parser_test.cc",
-    "semantics_manager_test.cc",
-    "settings_manager_test.cc",
   ]
   deps = [
     "//garnet/public/lib/fsl",
@@ -35,8 +44,9 @@
     "//sdk/lib/vfs/cpp",
     "//src/lib/fxl/test:gtest_main",
     "//src/ui/a11y/bin/a11y_manager:lib",
-    "//src/ui/a11y/tests/mocks",
-    "//src/ui/a11y/tests/util",
+    "//src/ui/a11y/bin/a11y_manager/tests/mocks",
+    "//src/ui/a11y/bin/a11y_manager/tests/util",
+    "//src/ui/a11y/lib/util",
     "//third_party/rapidjson",
   ]
 
diff --git a/src/ui/a11y/tests/integration/app_unittest.cc b/src/ui/a11y/bin/a11y_manager/tests/app_unittest.cc
similarity index 95%
rename from src/ui/a11y/tests/integration/app_unittest.cc
rename to src/ui/a11y/bin/a11y_manager/tests/app_unittest.cc
index cfb288b..dfb0493 100644
--- a/src/ui/a11y/tests/integration/app_unittest.cc
+++ b/src/ui/a11y/bin/a11y_manager/tests/app_unittest.cc
@@ -12,10 +12,10 @@
 #include <lib/vfs/cpp/pseudo_dir.h>
 
 #include "gtest/gtest.h"
-#include "src/ui/a11y/bin/a11y_manager/util.h"
-#include "src/ui/a11y/tests/mocks/mock_semantic_listener.h"
-#include "src/ui/a11y/tests/mocks/mock_settings_provider.h"
-#include "src/ui/a11y/tests/util/util.h"
+#include "src/ui/a11y/bin/a11y_manager/tests/mocks/mock_semantic_listener.h"
+#include "src/ui/a11y/bin/a11y_manager/tests/mocks/mock_settings_provider.h"
+#include "src/ui/a11y/bin/a11y_manager/tests/util/util.h"
+#include "src/ui/a11y/lib/util/util.h"
 
 namespace accessibility_test {
 namespace {
@@ -106,7 +106,7 @@
   // Check that the committed node is present in the semantic tree.
   vfs::PseudoDir *debug_dir = context_->outgoing()->debug_dir();
   vfs::internal::Node *test_node;
-  ASSERT_EQ(ZX_OK, debug_dir->Lookup(std::to_string(a11y_manager::GetKoid(view_ref_)), &test_node));
+  ASSERT_EQ(ZX_OK, debug_dir->Lookup(std::to_string(a11y::GetKoid(view_ref_)), &test_node));
 
   char buffer[kMaxLogBufferSize];
   ReadFile(test_node, kSemanticTreeSingle.size(), buffer);
diff --git a/src/ui/a11y/tests/meta/a11y_manager_apptests.cmx b/src/ui/a11y/bin/a11y_manager/tests/meta/a11y_manager_apptests.cmx
similarity index 100%
rename from src/ui/a11y/tests/meta/a11y_manager_apptests.cmx
rename to src/ui/a11y/bin/a11y_manager/tests/meta/a11y_manager_apptests.cmx
diff --git a/src/ui/a11y/tests/mocks/BUILD.gn b/src/ui/a11y/bin/a11y_manager/tests/mocks/BUILD.gn
similarity index 66%
copy from src/ui/a11y/tests/mocks/BUILD.gn
copy to src/ui/a11y/bin/a11y_manager/tests/mocks/BUILD.gn
index a183e05..3e3601d 100644
--- a/src/ui/a11y/tests/mocks/BUILD.gn
+++ b/src/ui/a11y/bin/a11y_manager/tests/mocks/BUILD.gn
@@ -1,25 +1,14 @@
-# Copyright 2018 The Fuchsia Authors. All rights reserved.
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
-
 source_set("mocks") {
   testonly = true
-
   sources = [
-    "mock_semantic_action_listener.cc",
-    "mock_semantic_action_listener.h",
     "mock_semantic_listener.cc",
     "mock_semantic_listener.h",
-    "mock_semantic_provider.cc",
-    "mock_semantic_provider.h",
     "mock_settings_provider.cc",
     "mock_settings_provider.h",
-    "mock_settings_service.cc",
-    "mock_settings_service.h",
-    "mock_settings_watcher.cc",
-    "mock_settings_watcher.h",
   ]
-
   deps = [
     "//garnet/public/lib/fsl",
     "//garnet/public/lib/gtest",
diff --git a/src/ui/a11y/tests/mocks/mock_semantic_listener.cc b/src/ui/a11y/bin/a11y_manager/tests/mocks/mock_semantic_listener.cc
similarity index 94%
rename from src/ui/a11y/tests/mocks/mock_semantic_listener.cc
rename to src/ui/a11y/bin/a11y_manager/tests/mocks/mock_semantic_listener.cc
index 2386930..84588f1 100644
--- a/src/ui/a11y/tests/mocks/mock_semantic_listener.cc
+++ b/src/ui/a11y/bin/a11y_manager/tests/mocks/mock_semantic_listener.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/mocks/mock_semantic_listener.h"
+#include "src/ui/a11y/bin/a11y_manager/tests/mocks/mock_semantic_listener.h"
 
 #include <lib/syslog/cpp/logger.h>
 
diff --git a/src/ui/a11y/tests/mocks/mock_semantic_listener.h b/src/ui/a11y/bin/a11y_manager/tests/mocks/mock_semantic_listener.h
similarity index 90%
rename from src/ui/a11y/tests/mocks/mock_semantic_listener.h
rename to src/ui/a11y/bin/a11y_manager/tests/mocks/mock_semantic_listener.h
index 04160a9..e7057b3 100644
--- a/src/ui/a11y/tests/mocks/mock_semantic_listener.h
+++ b/src/ui/a11y/bin/a11y_manager/tests/mocks/mock_semantic_listener.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_LISTENER_H_
-#define SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_LISTENER_H_
+#ifndef SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_MOCKS_MOCK_SEMANTIC_LISTENER_H_
+#define SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_MOCKS_MOCK_SEMANTIC_LISTENER_H_
 
 #include <fuchsia/accessibility/semantics/cpp/fidl.h>
 #include <fuchsia/ui/views/cpp/fidl.h>
@@ -57,4 +57,4 @@
 
 }  // namespace accessibility_test
 
-#endif  // SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_LISTENER_H_
+#endif  // SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_MOCKS_MOCK_SEMANTIC_LISTENER_H_
diff --git a/src/ui/a11y/tests/mocks/mock_settings_provider.cc b/src/ui/a11y/bin/a11y_manager/tests/mocks/mock_settings_provider.cc
similarity index 96%
rename from src/ui/a11y/tests/mocks/mock_settings_provider.cc
rename to src/ui/a11y/bin/a11y_manager/tests/mocks/mock_settings_provider.cc
index 84e5c11..83d2370 100644
--- a/src/ui/a11y/tests/mocks/mock_settings_provider.cc
+++ b/src/ui/a11y/bin/a11y_manager/tests/mocks/mock_settings_provider.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/mocks/mock_settings_provider.h"
+#include "src/ui/a11y/bin/a11y_manager/tests/mocks/mock_settings_provider.h"
 
 #include <lib/sys/cpp/testing/component_context_provider.h>
 #include <lib/syslog/cpp/logger.h>
diff --git a/src/ui/a11y/tests/mocks/mock_settings_provider.h b/src/ui/a11y/bin/a11y_manager/tests/mocks/mock_settings_provider.h
similarity index 89%
rename from src/ui/a11y/tests/mocks/mock_settings_provider.h
rename to src/ui/a11y/bin/a11y_manager/tests/mocks/mock_settings_provider.h
index e1c81ff..9b54373 100644
--- a/src/ui/a11y/tests/mocks/mock_settings_provider.h
+++ b/src/ui/a11y/bin/a11y_manager/tests/mocks/mock_settings_provider.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_PROVIDER_H_
-#define SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_PROVIDER_H_
+#ifndef SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_MOCKS_MOCK_SETTINGS_PROVIDER_H_
+#define SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_MOCKS_MOCK_SETTINGS_PROVIDER_H_
 
 #include <fuchsia/accessibility/cpp/fidl.h>
 #include <lib/async-loop/cpp/loop.h>
@@ -53,4 +53,4 @@
 
 }  // namespace accessibility_test
 
-#endif  // SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_PROVIDER_H_
+#endif  // SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_MOCKS_MOCK_SETTINGS_PROVIDER_H_
diff --git a/src/ui/a11y/tests/util/BUILD.gn b/src/ui/a11y/bin/a11y_manager/tests/util/BUILD.gn
similarity index 100%
rename from src/ui/a11y/tests/util/BUILD.gn
rename to src/ui/a11y/bin/a11y_manager/tests/util/BUILD.gn
diff --git a/src/ui/a11y/tests/util/util.cc b/src/ui/a11y/bin/a11y_manager/tests/util/util.cc
similarity index 94%
rename from src/ui/a11y/tests/util/util.cc
rename to src/ui/a11y/bin/a11y_manager/tests/util/util.cc
index ebafee4..0f2c454 100644
--- a/src/ui/a11y/tests/util/util.cc
+++ b/src/ui/a11y/bin/a11y_manager/tests/util/util.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/util/util.h"
+#include "src/ui/a11y/bin/a11y_manager/tests/util/util.h"
 
 namespace accessibility_test {
 
diff --git a/src/ui/a11y/tests/util/util.h b/src/ui/a11y/bin/a11y_manager/tests/util/util.h
similarity index 79%
rename from src/ui/a11y/tests/util/util.h
rename to src/ui/a11y/bin/a11y_manager/tests/util/util.h
index 7fa292d..4d6c137 100644
--- a/src/ui/a11y/tests/util/util.h
+++ b/src/ui/a11y/bin/a11y_manager/tests/util/util.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_TESTS_UTIL_UTIL_H_
-#define SRC_UI_A11Y_TESTS_UTIL_UTIL_H_
+#ifndef SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_UTIL_UTIL_H_
+#define SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_UTIL_UTIL_H_
 
 #include <lib/async-loop/cpp/loop.h>
 #include <lib/fdio/fd.h>
@@ -22,4 +22,4 @@
 
 }  // namespace accessibility_test
 
-#endif  // SRC_UI_A11Y_TESTS_UTIL_UTIL_H_
+#endif  // SRC_UI_A11Y_BIN_A11Y_MANAGER_TESTS_UTIL_UTIL_H_
diff --git a/src/ui/a11y/bundles/BUILD.gn b/src/ui/a11y/bundles/BUILD.gn
index e3468d30..1093315 100644
--- a/src/ui/a11y/bundles/BUILD.gn
+++ b/src/ui/a11y/bundles/BUILD.gn
@@ -5,7 +5,7 @@
 group("tests") {
   testonly = true
   public_deps = [
+    "//src/ui/a11y/bin/a11y_manager/tests:tests",
     "//src/ui/a11y/lib:tests",
-    "//src/ui/a11y/tests",
   ]
 }
diff --git a/src/ui/a11y/lib/BUILD.gn b/src/ui/a11y/lib/BUILD.gn
index 9ac8676..dc50e02 100644
--- a/src/ui/a11y/lib/BUILD.gn
+++ b/src/ui/a11y/lib/BUILD.gn
@@ -7,7 +7,11 @@
 group("lib") {
   deps = [
     "gesture_manager",
+    "screen_reader",
+    "semantics",
+    "settings",
     "tts",
+    "util",
   ]
 }
 
@@ -22,11 +26,49 @@
 test_package("a11y_lib_tests") {
   deps = [
     "gesture_manager/tests",
+    "screen_reader/tests",
+    "semantics/tests",
+    "settings/tests",
     "tts/tests",
   ]
+  resources = [
+    # needed for semantics_manager_test
+    {
+      path = "semantics/tests/testdata/semantic_tree_single_node.json"
+      dest = "semantic_tree_single_node.json"
+    },
+    {
+      path = "semantics/tests/testdata/semantic_tree_even_nodes.json"
+      dest = "semantic_tree_even_nodes.json"
+    },
+    {
+      path = "semantics/tests/testdata/semantic_tree_odd_nodes.json"
+      dest = "semantic_tree_odd_nodes.json"
+    },
+    {
+      path = "semantics/tests/testdata/deleted_subtree_even_nodes.json"
+      dest = "deleted_subtree_even_nodes.json"
+    },
+    {
+      path = "semantics/tests/testdata/cyclic_semantic_tree.json"
+      dest = "cyclic_semantic_tree.json"
+    },
+    {
+      path = "semantics/tests/testdata/semantic_tree_not_parseable.json"
+      dest = "semantic_tree_not_parseable.json"
+    },
+  ]
 
   tests = [
     {
+      name = "semantics_manager_tests"
+      environments = basic_envs
+    },
+    {
+      name = "settings_manager_tests"
+      environments = basic_envs
+    },
+    {
       name = "tts_manager_tests"
       environments = basic_envs
     },
diff --git a/src/ui/a11y/lib/meta/semantics_manager_tests.cmx b/src/ui/a11y/lib/meta/semantics_manager_tests.cmx
new file mode 100644
index 0000000..37bf2dc
--- /dev/null
+++ b/src/ui/a11y/lib/meta/semantics_manager_tests.cmx
@@ -0,0 +1,12 @@
+{
+    "program": {
+        "binary": "test/semantics_manager_tests"
+    },
+    "sandbox": {
+        "services": [
+            "fuchsia.logger.LogSink",
+            "fuchsia.sys.Environment",
+            "fuchsia.sys.Loader"
+        ]
+    }
+}
diff --git a/src/ui/a11y/lib/meta/settings_manager_tests.cmx b/src/ui/a11y/lib/meta/settings_manager_tests.cmx
new file mode 100644
index 0000000..b25d5e1
--- /dev/null
+++ b/src/ui/a11y/lib/meta/settings_manager_tests.cmx
@@ -0,0 +1,12 @@
+{
+    "program": {
+        "binary": "test/settings_manager_tests"
+    },
+    "sandbox": {
+        "services": [
+            "fuchsia.logger.LogSink",
+            "fuchsia.sys.Environment",
+            "fuchsia.sys.Loader"
+        ]
+    }
+}
diff --git a/src/ui/a11y/lib/meta/tts_manager_tests.cmx b/src/ui/a11y/lib/meta/tts_manager_tests.cmx
index 8906548..07711fc 100644
--- a/src/ui/a11y/lib/meta/tts_manager_tests.cmx
+++ b/src/ui/a11y/lib/meta/tts_manager_tests.cmx
@@ -4,6 +4,7 @@
     },
     "sandbox": {
         "services": [
+            "fuchsia.logger.LogSink",
             "fuchsia.sys.Environment",
             "fuchsia.sys.Loader"
         ]
diff --git a/src/ui/a11y/lib/screen_reader/BUILD.gn b/src/ui/a11y/lib/screen_reader/BUILD.gn
index 2370451..f2da27a 100644
--- a/src/ui/a11y/lib/screen_reader/BUILD.gn
+++ b/src/ui/a11y/lib/screen_reader/BUILD.gn
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-source_set("screen_reader_lib") {
+source_set("screen_reader") {
   sources = [
     "actions.h",
     "screen_reader.h",
diff --git a/src/ui/a11y/lib/screen_reader/tests/BUILD.gn b/src/ui/a11y/lib/screen_reader/tests/BUILD.gn
index 531c4ba..7aa7a82 100644
--- a/src/ui/a11y/lib/screen_reader/tests/BUILD.gn
+++ b/src/ui/a11y/lib/screen_reader/tests/BUILD.gn
@@ -2,6 +2,13 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+group("tests") {
+  testonly = true
+  public_deps = [
+    ":screen_reader_tests",
+  ]
+}
+
 executable("screen_reader_tests") {
   testonly = true
 
@@ -11,5 +18,6 @@
 
   deps = [
     "//src/lib/fxl/test:gtest_main",
+    "//src/ui/a11y/lib/screen_reader",
   ]
 }
diff --git a/src/ui/a11y/lib/semantics/BUILD.gn b/src/ui/a11y/lib/semantics/BUILD.gn
new file mode 100644
index 0000000..de8dc7c
--- /dev/null
+++ b/src/ui/a11y/lib/semantics/BUILD.gn
@@ -0,0 +1,31 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_set("semantics") {
+  sources = [
+    "semantic_tree_impl.cc",
+    "semantic_tree_impl.h",
+    "semantics_manager_impl.cc",
+    "semantics_manager_impl.h",
+  ]
+
+  public_deps = [
+    "//sdk/fidl/fuchsia.accessibility",
+    "//sdk/fidl/fuchsia.accessibility.semantics",
+    "//sdk/fidl/fuchsia.math",
+    "//src/ui/a11y/lib/util",
+  ]
+
+  deps = [
+    "//garnet/lib/ui/gfx",
+    "//garnet/public/lib/fsl",
+    "//garnet/public/lib/syslog/cpp",
+    "//sdk/fidl/fuchsia.ui.gfx",
+    "//sdk/fidl/fuchsia.ui.input",
+    "//sdk/fidl/fuchsia.ui.views",
+    "//sdk/lib/fidl/cpp",
+    "//sdk/lib/sys/cpp",
+    "//src/lib/fxl",
+  ]
+}
diff --git a/src/ui/a11y/bin/a11y_manager/semantics/semantic_tree_impl.cc b/src/ui/a11y/lib/semantics/semantic_tree_impl.cc
similarity index 98%
rename from src/ui/a11y/bin/a11y_manager/semantics/semantic_tree_impl.cc
rename to src/ui/a11y/lib/semantics/semantic_tree_impl.cc
index 57076b2..de76bf5 100644
--- a/src/ui/a11y/bin/a11y_manager/semantics/semantic_tree_impl.cc
+++ b/src/ui/a11y/lib/semantics/semantic_tree_impl.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/bin/a11y_manager/semantics/semantic_tree_impl.h"
+#include "src/ui/a11y/lib/semantics/semantic_tree_impl.h"
 
 #include <lib/fsl/handles/object_info.h>
 #include <lib/syslog/cpp/logger.h>
@@ -10,7 +10,7 @@
 #include "src/lib/fxl/logging.h"
 #include "src/lib/fxl/strings/concatenate.h"
 
-namespace a11y_manager {
+namespace a11y {
 // Max file size of semantic tree log file is 1MB.
 constexpr size_t kMaxDebugFileSize = 1024 * 1024;
 const std::string kNewLine = "\n";
@@ -235,4 +235,4 @@
   client_action_listener_->HitTest(local_point, std::move(callback));
 }
 
-}  // namespace a11y_manager
+}  // namespace a11y
diff --git a/src/ui/a11y/bin/a11y_manager/semantics/semantic_tree_impl.h b/src/ui/a11y/lib/semantics/semantic_tree_impl.h
similarity index 93%
rename from src/ui/a11y/bin/a11y_manager/semantics/semantic_tree_impl.h
rename to src/ui/a11y/lib/semantics/semantic_tree_impl.h
index 1a6f44f..9a8f3ac 100644
--- a/src/ui/a11y/bin/a11y_manager/semantics/semantic_tree_impl.h
+++ b/src/ui/a11y/lib/semantics/semantic_tree_impl.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_BIN_A11Y_MANAGER_SEMANTICS_SEMANTIC_TREE_IMPL_H_
-#define SRC_UI_A11Y_BIN_A11Y_MANAGER_SEMANTICS_SEMANTIC_TREE_IMPL_H_
+#ifndef SRC_UI_A11Y_LIB_SEMANTICS_SEMANTIC_TREE_IMPL_H_
+#define SRC_UI_A11Y_LIB_SEMANTICS_SEMANTIC_TREE_IMPL_H_
 
 #include <fuchsia/accessibility/semantics/cpp/fidl.h>
 #include <fuchsia/math/cpp/fidl.h>
@@ -17,9 +17,9 @@
 #include <src/lib/fxl/macros.h>
 
 #include "garnet/lib/ui/gfx/util/unwrap.h"
-#include "src/ui/a11y/bin/a11y_manager/util.h"
+#include "src/ui/a11y/lib/util/util.h"
 
-namespace a11y_manager {
+namespace a11y {
 
 class SemanticTreeImpl : public fuchsia::accessibility::semantics::SemanticTree {
  public:
@@ -121,6 +121,6 @@
 
   FXL_DISALLOW_COPY_AND_ASSIGN(SemanticTreeImpl);
 };
-}  // namespace a11y_manager
+}  // namespace a11y
 
-#endif  // SRC_UI_A11Y_BIN_A11Y_MANAGER_SEMANTICS_SEMANTIC_TREE_IMPL_H_
+#endif  // SRC_UI_A11Y_LIB_SEMANTICS_SEMANTIC_TREE_IMPL_H_
diff --git a/src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.cc b/src/ui/a11y/lib/semantics/semantics_manager_impl.cc
similarity index 96%
rename from src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.cc
rename to src/ui/a11y/lib/semantics/semantics_manager_impl.cc
index 31758ee..aa16957 100644
--- a/src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.cc
+++ b/src/ui/a11y/lib/semantics/semantics_manager_impl.cc
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.h"
+#include "src/ui/a11y/lib/semantics/semantics_manager_impl.h"
 
 #include <lib/syslog/cpp/logger.h>
 #include <zircon/status.h>
 
-namespace a11y_manager {
+namespace a11y {
 
 SemanticsManagerImpl::SemanticsManagerImpl() { enabled_ = false; }
 
@@ -84,4 +84,4 @@
   FX_LOGS(INFO) << "Given KOID(" << koid << ") doesn't match any existing ViewRef's koid.";
 }
 
-}  // namespace a11y_manager
+}  // namespace a11y
diff --git a/src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.h b/src/ui/a11y/lib/semantics/semantics_manager_impl.h
similarity index 88%
rename from src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.h
rename to src/ui/a11y/lib/semantics/semantics_manager_impl.h
index 8cbcba2..f49ad78 100644
--- a/src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.h
+++ b/src/ui/a11y/lib/semantics/semantics_manager_impl.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_BIN_A11Y_MANAGER_SEMANTICS_SEMANTICS_MANAGER_IMPL_H_
-#define SRC_UI_A11Y_BIN_A11Y_MANAGER_SEMANTICS_SEMANTICS_MANAGER_IMPL_H_
+#ifndef SRC_UI_A11Y_LIB_SEMANTICS_SEMANTICS_MANAGER_IMPL_H_
+#define SRC_UI_A11Y_LIB_SEMANTICS_SEMANTICS_MANAGER_IMPL_H_
 
 #include <fuchsia/accessibility/semantics/cpp/fidl.h>
 #include <fuchsia/ui/views/cpp/fidl.h>
@@ -11,9 +11,9 @@
 #include <lib/sys/cpp/component_context.h>
 #include <lib/vfs/cpp/pseudo_file.h>
 
-#include "src/ui/a11y/bin/a11y_manager/semantics/semantic_tree_impl.h"
+#include "src/ui/a11y/lib/semantics/semantic_tree_impl.h"
 
-namespace a11y_manager {
+namespace a11y {
 class SemanticsManagerImpl : public fuchsia::accessibility::semantics::SemanticsManager {
  public:
   SemanticsManagerImpl();
@@ -67,6 +67,6 @@
 
   vfs::PseudoDir* debug_dir_ = nullptr;
 };
-}  // namespace a11y_manager
+}  // namespace a11y
 
-#endif  // SRC_UI_A11Y_BIN_A11Y_MANAGER_SEMANTICS_SEMANTICS_MANAGER_IMPL_H_
+#endif  // SRC_UI_A11Y_LIB_SEMANTICS_SEMANTICS_MANAGER_IMPL_H_
diff --git a/src/ui/a11y/tests/integration/BUILD.gn b/src/ui/a11y/lib/semantics/tests/BUILD.gn
similarity index 77%
rename from src/ui/a11y/tests/integration/BUILD.gn
rename to src/ui/a11y/lib/semantics/tests/BUILD.gn
index 1dde56f8..1da96e1 100644
--- a/src/ui/a11y/tests/integration/BUILD.gn
+++ b/src/ui/a11y/lib/semantics/tests/BUILD.gn
@@ -5,22 +5,23 @@
 group("tests") {
   testonly = true
   public_deps = [
-    ":a11y_manager_apptests",
+    ":semantics_manager_tests",
   ]
 }
 
-executable("a11y_manager_apptests") {
-  output_name = "a11y_manager_apptests"
+executable("semantics_manager_tests") {
+  output_name = "semantics_manager_tests"
 
   testonly = true
 
   sources = [
-    "app_unittest.cc",
     "semantic_tree_parser.cc",
     "semantic_tree_parser.h",
     "semantic_tree_parser_test.cc",
     "semantics_manager_test.cc",
-    "settings_manager_test.cc",
+  ]
+  public_deps = [
+    "//sdk/fidl/fuchsia.accessibility.semantics",
   ]
   deps = [
     "//garnet/public/lib/fsl",
@@ -34,9 +35,8 @@
     "//sdk/lib/sys/cpp/testing:unit",
     "//sdk/lib/vfs/cpp",
     "//src/lib/fxl/test:gtest_main",
-    "//src/ui/a11y/bin/a11y_manager:lib",
-    "//src/ui/a11y/tests/mocks",
-    "//src/ui/a11y/tests/util",
+    "//src/ui/a11y/lib/semantics",
+    "//src/ui/a11y/lib/semantics/tests/mocks",
     "//third_party/rapidjson",
   ]
 
diff --git a/src/ui/a11y/tests/mocks/BUILD.gn b/src/ui/a11y/lib/semantics/tests/mocks/BUILD.gn
similarity index 73%
rename from src/ui/a11y/tests/mocks/BUILD.gn
rename to src/ui/a11y/lib/semantics/tests/mocks/BUILD.gn
index a183e05..010b836 100644
--- a/src/ui/a11y/tests/mocks/BUILD.gn
+++ b/src/ui/a11y/lib/semantics/tests/mocks/BUILD.gn
@@ -8,16 +8,8 @@
   sources = [
     "mock_semantic_action_listener.cc",
     "mock_semantic_action_listener.h",
-    "mock_semantic_listener.cc",
-    "mock_semantic_listener.h",
     "mock_semantic_provider.cc",
     "mock_semantic_provider.h",
-    "mock_settings_provider.cc",
-    "mock_settings_provider.h",
-    "mock_settings_service.cc",
-    "mock_settings_service.h",
-    "mock_settings_watcher.cc",
-    "mock_settings_watcher.h",
   ]
 
   deps = [
diff --git a/src/ui/a11y/tests/mocks/mock_semantic_action_listener.cc b/src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_action_listener.cc
similarity index 91%
rename from src/ui/a11y/tests/mocks/mock_semantic_action_listener.cc
rename to src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_action_listener.cc
index b457523..bb11dfc 100644
--- a/src/ui/a11y/tests/mocks/mock_semantic_action_listener.cc
+++ b/src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_action_listener.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/mocks/mock_semantic_action_listener.h"
+#include "src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_action_listener.h"
 
 #include <lib/syslog/cpp/logger.h>
 
diff --git a/src/ui/a11y/tests/mocks/mock_semantic_action_listener.h b/src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_action_listener.h
similarity index 87%
rename from src/ui/a11y/tests/mocks/mock_semantic_action_listener.h
rename to src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_action_listener.h
index 8cec554..c68b9fa 100644
--- a/src/ui/a11y/tests/mocks/mock_semantic_action_listener.h
+++ b/src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_action_listener.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_ACTION_LISTENER_H_
-#define SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_ACTION_LISTENER_H_
+#ifndef SRC_UI_A11Y_LIB_SEMANTICS_TESTS_MOCKS_MOCK_SEMANTIC_ACTION_LISTENER_H_
+#define SRC_UI_A11Y_LIB_SEMANTICS_TESTS_MOCKS_MOCK_SEMANTIC_ACTION_LISTENER_H_
 
 #include <fuchsia/accessibility/semantics/cpp/fidl.h>
 #include <fuchsia/ui/views/cpp/fidl.h>
@@ -49,4 +49,4 @@
 
 }  // namespace accessibility_test
 
-#endif  // SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_ACTION_LISTENER_H_
+#endif  // SRC_UI_A11Y_LIB_SEMANTICS_TESTS_MOCKS_MOCK_SEMANTIC_ACTION_LISTENER_H_
diff --git a/src/ui/a11y/tests/mocks/mock_semantic_provider.cc b/src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_provider.cc
similarity index 94%
rename from src/ui/a11y/tests/mocks/mock_semantic_provider.cc
rename to src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_provider.cc
index e65183f..891f160 100644
--- a/src/ui/a11y/tests/mocks/mock_semantic_provider.cc
+++ b/src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_provider.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/mocks/mock_semantic_provider.h"
+#include "src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_provider.h"
 
 #include <lib/syslog/cpp/logger.h>
 
diff --git a/src/ui/a11y/tests/mocks/mock_semantic_provider.h b/src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_provider.h
similarity index 86%
rename from src/ui/a11y/tests/mocks/mock_semantic_provider.h
rename to src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_provider.h
index 1aa759e..c9ed134 100644
--- a/src/ui/a11y/tests/mocks/mock_semantic_provider.h
+++ b/src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_provider.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_PROVIDER_H_
-#define SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_PROVIDER_H_
+#ifndef SRC_UI_A11Y_LIB_SEMANTICS_TESTS_MOCKS_MOCK_SEMANTIC_PROVIDER_H_
+#define SRC_UI_A11Y_LIB_SEMANTICS_TESTS_MOCKS_MOCK_SEMANTIC_PROVIDER_H_
 
 #include <fuchsia/accessibility/semantics/cpp/fidl.h>
 #include <fuchsia/ui/views/cpp/fidl.h>
@@ -12,7 +12,7 @@
 
 #include "src/lib/fxl/logging.h"
 #include "src/lib/fxl/macros.h"
-#include "src/ui/a11y/tests/mocks/mock_semantic_action_listener.h"
+#include "src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_action_listener.h"
 
 namespace accessibility_test {
 
@@ -56,4 +56,4 @@
 
 }  // namespace accessibility_test
 
-#endif  // SRC_UI_A11Y_TESTS_MOCKS_MOCK_SEMANTIC_PROVIDER_H_
+#endif  // SRC_UI_A11Y_LIB_SEMANTICS_TESTS_MOCKS_MOCK_SEMANTIC_PROVIDER_H_
diff --git a/src/ui/a11y/tests/integration/semantic_tree_parser.cc b/src/ui/a11y/lib/semantics/tests/semantic_tree_parser.cc
similarity index 94%
rename from src/ui/a11y/tests/integration/semantic_tree_parser.cc
rename to src/ui/a11y/lib/semantics/tests/semantic_tree_parser.cc
index 921a6d7..7b0ba32 100644
--- a/src/ui/a11y/tests/integration/semantic_tree_parser.cc
+++ b/src/ui/a11y/lib/semantics/tests/semantic_tree_parser.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/integration/semantic_tree_parser.h"
+#include "src/ui/a11y/lib/semantics/tests/semantic_tree_parser.h"
 
 #include "src/lib/fxl/logging.h"
 
diff --git a/src/ui/a11y/tests/integration/semantic_tree_parser.h b/src/ui/a11y/lib/semantics/tests/semantic_tree_parser.h
similarity index 82%
rename from src/ui/a11y/tests/integration/semantic_tree_parser.h
rename to src/ui/a11y/lib/semantics/tests/semantic_tree_parser.h
index 16655bf..baccfad 100644
--- a/src/ui/a11y/tests/integration/semantic_tree_parser.h
+++ b/src/ui/a11y/lib/semantics/tests/semantic_tree_parser.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_TESTS_INTEGRATION_SEMANTIC_TREE_PARSER_H_
-#define SRC_UI_A11Y_TESTS_INTEGRATION_SEMANTIC_TREE_PARSER_H_
+#ifndef SRC_UI_A11Y_LIB_SEMANTICS_TESTS_SEMANTIC_TREE_PARSER_H_
+#define SRC_UI_A11Y_LIB_SEMANTICS_TESTS_SEMANTIC_TREE_PARSER_H_
 
 #include <fuchsia/accessibility/semantics/cpp/fidl.h>
 
@@ -31,4 +31,4 @@
 
 }  // namespace accessibility_test
 
-#endif  // SRC_UI_A11Y_TESTS_INTEGRATION_SEMANTIC_TREE_PARSER_H_
+#endif  // SRC_UI_A11Y_LIB_SEMANTICS_TESTS_SEMANTIC_TREE_PARSER_H_
diff --git a/src/ui/a11y/tests/integration/semantic_tree_parser_test.cc b/src/ui/a11y/lib/semantics/tests/semantic_tree_parser_test.cc
similarity index 95%
rename from src/ui/a11y/tests/integration/semantic_tree_parser_test.cc
rename to src/ui/a11y/lib/semantics/tests/semantic_tree_parser_test.cc
index 167e0fe..3e73fea 100644
--- a/src/ui/a11y/tests/integration/semantic_tree_parser_test.cc
+++ b/src/ui/a11y/lib/semantics/tests/semantic_tree_parser_test.cc
@@ -2,13 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/integration/semantic_tree_parser.h"
+#include "src/ui/a11y/lib/semantics/tests/semantic_tree_parser.h"
 
 #include <lib/gtest/test_loop_fixture.h>
-#include <src/lib/fxl/logging.h>
 
 #include <vector>
 
+#include <src/lib/fxl/logging.h>
+
 namespace accessibility_test {
 using fuchsia::accessibility::semantics::Node;
 
diff --git a/src/ui/a11y/tests/integration/semantics_manager_test.cc b/src/ui/a11y/lib/semantics/tests/semantics_manager_test.cc
similarity index 96%
rename from src/ui/a11y/tests/integration/semantics_manager_test.cc
rename to src/ui/a11y/lib/semantics/tests/semantics_manager_test.cc
index edbc570..63d1692 100644
--- a/src/ui/a11y/tests/integration/semantics_manager_test.cc
+++ b/src/ui/a11y/lib/semantics/tests/semantics_manager_test.cc
@@ -16,10 +16,10 @@
 
 #include <gtest/gtest.h>
 
-#include "src/ui/a11y/bin/a11y_manager/semantics/semantics_manager_impl.h"
-#include "src/ui/a11y/bin/a11y_manager/util.h"
-#include "src/ui/a11y/tests/integration/semantic_tree_parser.h"
-#include "src/ui/a11y/tests/mocks/mock_semantic_provider.h"
+#include "src/ui/a11y/lib/semantics/semantics_manager_impl.h"
+#include "src/ui/a11y/lib/semantics/tests/mocks/mock_semantic_provider.h"
+#include "src/ui/a11y/lib/semantics/tests/semantic_tree_parser.h"
+#include "src/ui/a11y/lib/util/util.h"
 
 namespace accessibility_test {
 using fuchsia::accessibility::semantics::Attributes;
@@ -55,7 +55,7 @@
 const std::string kCyclicSemanticTreePath = "/pkg/data/cyclic_semantic_tree.json";
 const std::string kDeletedSemanticSubtreePath = "/pkg/data/deleted_subtree_even_nodes.json";
 
-// Unit tests for src/ui/a11y/bin/a11y_manager/semantics_manager_impl.h and
+// Unit tests for src/ui/a11y/lib/semantics_manager_impl.h and
 // semantic_tree_impl.h
 class SemanticsManagerTest : public gtest::RealLoopFixture {
  public:
@@ -85,7 +85,7 @@
   char *ReadFile(vfs::internal::Node *node, int length, char *buffer);
 
   fuchsia::ui::views::ViewRef view_ref_;
-  a11y_manager::SemanticsManagerImpl semantics_manager_impl_;
+  a11y::SemanticsManagerImpl semantics_manager_impl_;
   sys::testing::ComponentContextProvider context_provider_;
   SemanticTreeParser semantic_tree_parser_;
 };
@@ -452,8 +452,8 @@
   InitializeActionListener(kSemanticTreeOddNodesPath, &semantic_provider);
   vfs::PseudoDir *debug_dir = context_provider_.context()->outgoing()->debug_dir();
   vfs::internal::Node *node;
-  EXPECT_EQ(ZX_OK, debug_dir->Lookup(
-                       std::to_string(a11y_manager::GetKoid(view_ref_connection_copy)), &node));
+  EXPECT_EQ(ZX_OK,
+            debug_dir->Lookup(std::to_string(a11y::GetKoid(view_ref_connection_copy)), &node));
 
   char buffer[kMaxLogBufferSize];
   ReadFile(node, kSemanticTreeOdd.size(), buffer);
@@ -478,8 +478,8 @@
   InitializeActionListener(kSemanticTreeEvenNodesPath, &semantic_provider);
   vfs::PseudoDir *debug_dir = context_provider_.context()->outgoing()->debug_dir();
   vfs::internal::Node *node;
-  EXPECT_EQ(ZX_OK, debug_dir->Lookup(
-                       std::to_string(a11y_manager::GetKoid(view_ref_connection_copy)), &node));
+  EXPECT_EQ(ZX_OK,
+            debug_dir->Lookup(std::to_string(a11y::GetKoid(view_ref_connection_copy)), &node));
 
   char buffer[kMaxLogBufferSize];
   ReadFile(node, kSemanticTreeEven.size(), buffer);
@@ -504,8 +504,8 @@
   InitializeActionListener(kSemanticTreeSingleNodePath, &semantic_provider);
   vfs::PseudoDir *debug_dir = context_provider_.context()->outgoing()->debug_dir();
   vfs::internal::Node *node;
-  EXPECT_EQ(ZX_OK, debug_dir->Lookup(
-                       std::to_string(a11y_manager::GetKoid(view_ref_connection_copy)), &node));
+  EXPECT_EQ(ZX_OK,
+            debug_dir->Lookup(std::to_string(a11y::GetKoid(view_ref_connection_copy)), &node));
 
   char buffer[kMaxLogBufferSize];
   ReadFile(node, kSemanticTreeSingle.size(), buffer);
@@ -581,7 +581,7 @@
   uint32_t expected_result = 5;
   semantic_provider.SetHitTestResult(expected_result);
 
-  zx_koid_t koid = a11y_manager::GetKoid(view_ref_);
+  zx_koid_t koid = a11y::GetKoid(view_ref_);
   ::fuchsia::math::PointF local_point;
   bool done = false;
   semantics_manager_impl_.PerformHitTesting(
@@ -624,7 +624,7 @@
   RunLoopUntilIdle();
 
   // Check that the committed node is present in the semantic tree.
-  zx_koid_t koid = a11y_manager::GetKoid(view_ref_);
+  zx_koid_t koid = a11y::GetKoid(view_ref_);
   NodePtr returned_node = semantics_manager_impl_.GetAccessibilityNodeByKoid(koid, 0);
   EXPECT_NE(returned_node, nullptr);
   EXPECT_EQ(node.node_id(), returned_node->node_id());
diff --git a/src/ui/a11y/tests/integration/testdata/cyclic_semantic_tree.json b/src/ui/a11y/lib/semantics/tests/testdata/cyclic_semantic_tree.json
similarity index 100%
rename from src/ui/a11y/tests/integration/testdata/cyclic_semantic_tree.json
rename to src/ui/a11y/lib/semantics/tests/testdata/cyclic_semantic_tree.json
diff --git a/src/ui/a11y/tests/integration/testdata/deleted_subtree_even_nodes.json b/src/ui/a11y/lib/semantics/tests/testdata/deleted_subtree_even_nodes.json
similarity index 100%
rename from src/ui/a11y/tests/integration/testdata/deleted_subtree_even_nodes.json
rename to src/ui/a11y/lib/semantics/tests/testdata/deleted_subtree_even_nodes.json
diff --git a/src/ui/a11y/tests/integration/testdata/semantic_tree_even_nodes.json b/src/ui/a11y/lib/semantics/tests/testdata/semantic_tree_even_nodes.json
similarity index 100%
rename from src/ui/a11y/tests/integration/testdata/semantic_tree_even_nodes.json
rename to src/ui/a11y/lib/semantics/tests/testdata/semantic_tree_even_nodes.json
diff --git a/src/ui/a11y/tests/integration/testdata/semantic_tree_not_parseable.json b/src/ui/a11y/lib/semantics/tests/testdata/semantic_tree_not_parseable.json
similarity index 100%
rename from src/ui/a11y/tests/integration/testdata/semantic_tree_not_parseable.json
rename to src/ui/a11y/lib/semantics/tests/testdata/semantic_tree_not_parseable.json
diff --git a/src/ui/a11y/tests/integration/testdata/semantic_tree_odd_nodes.json b/src/ui/a11y/lib/semantics/tests/testdata/semantic_tree_odd_nodes.json
similarity index 100%
rename from src/ui/a11y/tests/integration/testdata/semantic_tree_odd_nodes.json
rename to src/ui/a11y/lib/semantics/tests/testdata/semantic_tree_odd_nodes.json
diff --git a/src/ui/a11y/tests/integration/testdata/semantic_tree_single_node.json b/src/ui/a11y/lib/semantics/tests/testdata/semantic_tree_single_node.json
similarity index 100%
rename from src/ui/a11y/tests/integration/testdata/semantic_tree_single_node.json
rename to src/ui/a11y/lib/semantics/tests/testdata/semantic_tree_single_node.json
diff --git a/src/ui/a11y/lib/settings/BUILD.gn b/src/ui/a11y/lib/settings/BUILD.gn
new file mode 100644
index 0000000..31c6446
--- /dev/null
+++ b/src/ui/a11y/lib/settings/BUILD.gn
@@ -0,0 +1,31 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_set("settings") {
+  sources = [
+    "settings_manager_impl.cc",
+    "settings_manager_impl.h",
+    "settings_provider_impl.cc",
+    "settings_provider_impl.h",
+  ]
+
+  public_deps = [
+    "//sdk/fidl/fuchsia.accessibility",
+    "//sdk/fidl/fuchsia.accessibility.semantics",
+    "//sdk/fidl/fuchsia.math",
+    "//src/ui/a11y/lib/util",
+  ]
+
+  deps = [
+    "//garnet/lib/ui/gfx",
+    "//garnet/public/lib/fsl",
+    "//garnet/public/lib/syslog/cpp",
+    "//sdk/fidl/fuchsia.ui.gfx",
+    "//sdk/fidl/fuchsia.ui.input",
+    "//sdk/fidl/fuchsia.ui.views",
+    "//sdk/lib/fidl/cpp",
+    "//sdk/lib/sys/cpp",
+    "//src/lib/fxl",
+  ]
+}
diff --git a/src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.cc b/src/ui/a11y/lib/settings/settings_manager_impl.cc
similarity index 86%
rename from src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.cc
rename to src/ui/a11y/lib/settings/settings_manager_impl.cc
index dc9c3a5..d659a3b 100644
--- a/src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.cc
+++ b/src/ui/a11y/lib/settings/settings_manager_impl.cc
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.h"
+#include "src/ui/a11y/lib/settings/settings_manager_impl.h"
 
 #include <lib/syslog/cpp/logger.h>
+
 #include <src/lib/fxl/logging.h>
 
-namespace a11y_manager {
+namespace a11y {
 
 void SettingsManagerImpl::AddBinding(
     fidl::InterfaceRequest<fuchsia::accessibility::SettingsManager> request) {
@@ -24,4 +25,4 @@
   settings_provider_impl_.AddWatcher(std::move(watcher));
 }
 
-}  // namespace a11y_manager
+}  // namespace a11y
diff --git a/src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.h b/src/ui/a11y/lib/settings/settings_manager_impl.h
similarity index 75%
rename from src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.h
rename to src/ui/a11y/lib/settings/settings_manager_impl.h
index d42ebe7..0a69b5b 100644
--- a/src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.h
+++ b/src/ui/a11y/lib/settings/settings_manager_impl.h
@@ -2,16 +2,17 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_BIN_A11Y_MANAGER_SETTINGS_SETTINGS_MANAGER_IMPL_H_
-#define SRC_UI_A11Y_BIN_A11Y_MANAGER_SETTINGS_SETTINGS_MANAGER_IMPL_H_
+#ifndef SRC_UI_A11Y_LIB_SETTINGS_SETTINGS_MANAGER_IMPL_H_
+#define SRC_UI_A11Y_LIB_SETTINGS_SETTINGS_MANAGER_IMPL_H_
 
 #include <fuchsia/accessibility/cpp/fidl.h>
 #include <lib/fidl/cpp/binding_set.h>
+
 #include <src/lib/fxl/macros.h>
 
-#include "src/ui/a11y/bin/a11y_manager/settings/settings_provider_impl.h"
+#include "src/ui/a11y/lib/settings/settings_provider_impl.h"
 
-namespace a11y_manager {
+namespace a11y {
 class SettingsManagerImpl : public fuchsia::accessibility::SettingsManager {
  public:
   explicit SettingsManagerImpl() = default;
@@ -34,6 +35,6 @@
   FXL_DISALLOW_COPY_AND_ASSIGN(SettingsManagerImpl);
 };
 
-}  // namespace a11y_manager
+}  // namespace a11y
 
-#endif  // SRC_UI_A11Y_BIN_A11Y_MANAGER_SETTINGS_SETTINGS_MANAGER_IMPL_H_
+#endif  // SRC_UI_A11Y_LIB_SETTINGS_SETTINGS_MANAGER_IMPL_H_
diff --git a/src/ui/a11y/bin/a11y_manager/settings/settings_provider_impl.cc b/src/ui/a11y/lib/settings/settings_provider_impl.cc
similarity index 97%
rename from src/ui/a11y/bin/a11y_manager/settings/settings_provider_impl.cc
rename to src/ui/a11y/lib/settings/settings_provider_impl.cc
index 84edd85..827915f 100644
--- a/src/ui/a11y/bin/a11y_manager/settings/settings_provider_impl.cc
+++ b/src/ui/a11y/lib/settings/settings_provider_impl.cc
@@ -2,14 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/bin/a11y_manager/settings/settings_provider_impl.h"
+#include "src/ui/a11y/lib/settings/settings_provider_impl.h"
 
 #include <lib/syslog/cpp/logger.h>
+
 #include <src/lib/fxl/logging.h>
 
-#include "src/ui/a11y/bin/a11y_manager/util.h"
+#include "src/ui/a11y/lib/util/util.h"
 
-namespace a11y_manager {
+namespace a11y {
 
 // clang-format off
 const std::array<float, 9> kIdentityMatrix = {
@@ -192,4 +193,4 @@
   return Multiply3x3MatrixRowMajor(color_inversion_matrix, color_correction_matrix);
 }
 
-}  // namespace a11y_manager
+}  // namespace a11y
diff --git a/src/ui/a11y/bin/a11y_manager/settings/settings_provider_impl.h b/src/ui/a11y/lib/settings/settings_provider_impl.h
similarity index 89%
rename from src/ui/a11y/bin/a11y_manager/settings/settings_provider_impl.h
rename to src/ui/a11y/lib/settings/settings_provider_impl.h
index 686e588..212a73b 100644
--- a/src/ui/a11y/bin/a11y_manager/settings/settings_provider_impl.h
+++ b/src/ui/a11y/lib/settings/settings_provider_impl.h
@@ -2,17 +2,18 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_BIN_A11Y_MANAGER_SETTINGS_SETTINGS_PROVIDER_IMPL_H_
-#define SRC_UI_A11Y_BIN_A11Y_MANAGER_SETTINGS_SETTINGS_PROVIDER_IMPL_H_
+#ifndef SRC_UI_A11Y_LIB_SETTINGS_SETTINGS_PROVIDER_IMPL_H_
+#define SRC_UI_A11Y_LIB_SETTINGS_SETTINGS_PROVIDER_IMPL_H_
 
 #include <fuchsia/accessibility/cpp/fidl.h>
 #include <lib/fidl/cpp/binding.h>
 #include <math.h>
-#include <src/lib/fxl/macros.h>
 
 #include <array>
 
-namespace a11y_manager {
+#include <src/lib/fxl/macros.h>
+
+namespace a11y {
 
 class SettingsProviderImpl : public fuchsia::accessibility::SettingsProvider {
  public:
@@ -64,5 +65,5 @@
   FXL_DISALLOW_COPY_AND_ASSIGN(SettingsProviderImpl);
 };
 
-}  // namespace a11y_manager
-#endif  // SRC_UI_A11Y_BIN_A11Y_MANAGER_SETTINGS_SETTINGS_PROVIDER_IMPL_H_
+}  // namespace a11y
+#endif  // SRC_UI_A11Y_LIB_SETTINGS_SETTINGS_PROVIDER_IMPL_H_
diff --git a/src/ui/a11y/lib/settings/tests/BUILD.gn b/src/ui/a11y/lib/settings/tests/BUILD.gn
new file mode 100644
index 0000000..03b9034
--- /dev/null
+++ b/src/ui/a11y/lib/settings/tests/BUILD.gn
@@ -0,0 +1,37 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+group("tests") {
+  testonly = true
+  public_deps = [
+    ":settings_manager_tests",
+  ]
+}
+
+executable("settings_manager_tests") {
+  output_name = "settings_manager_tests"
+
+  testonly = true
+
+  sources = [
+    "settings_manager_test.cc",
+  ]
+
+  deps = [
+    "//garnet/public/lib/fsl",
+    "//garnet/public/lib/gtest",
+    "//garnet/public/lib/json",
+    "//garnet/public/lib/syslog/cpp",
+    "//sdk/fidl/fuchsia.accessibility",
+    "//sdk/fidl/fuchsia.sys",
+    "//sdk/lib/fidl/cpp",
+    "//sdk/lib/sys/cpp",
+    "//sdk/lib/sys/cpp/testing:unit",
+    "//sdk/lib/vfs/cpp",
+    "//src/lib/fxl/test:gtest_main",
+    "//src/ui/a11y/lib/settings",
+    "//src/ui/a11y/lib/settings/tests/mocks",
+    "//third_party/rapidjson",
+  ]
+}
diff --git a/src/ui/a11y/tests/mocks/BUILD.gn b/src/ui/a11y/lib/settings/tests/mocks/BUILD.gn
similarity index 72%
copy from src/ui/a11y/tests/mocks/BUILD.gn
copy to src/ui/a11y/lib/settings/tests/mocks/BUILD.gn
index a183e05..06ba5ed 100644
--- a/src/ui/a11y/tests/mocks/BUILD.gn
+++ b/src/ui/a11y/lib/settings/tests/mocks/BUILD.gn
@@ -6,14 +6,6 @@
   testonly = true
 
   sources = [
-    "mock_semantic_action_listener.cc",
-    "mock_semantic_action_listener.h",
-    "mock_semantic_listener.cc",
-    "mock_semantic_listener.h",
-    "mock_semantic_provider.cc",
-    "mock_semantic_provider.h",
-    "mock_settings_provider.cc",
-    "mock_settings_provider.h",
     "mock_settings_service.cc",
     "mock_settings_service.h",
     "mock_settings_watcher.cc",
diff --git a/src/ui/a11y/tests/mocks/mock_settings_service.cc b/src/ui/a11y/lib/settings/tests/mocks/mock_settings_service.cc
similarity index 96%
rename from src/ui/a11y/tests/mocks/mock_settings_service.cc
rename to src/ui/a11y/lib/settings/tests/mocks/mock_settings_service.cc
index 71c7e77..23d2939 100644
--- a/src/ui/a11y/tests/mocks/mock_settings_service.cc
+++ b/src/ui/a11y/lib/settings/tests/mocks/mock_settings_service.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/mocks/mock_settings_service.h"
+#include "src/ui/a11y/lib/settings/tests/mocks/mock_settings_service.h"
 
 #include <lib/sys/cpp/testing/component_context_provider.h>
 #include <lib/syslog/cpp/logger.h>
diff --git a/src/ui/a11y/tests/mocks/mock_settings_service.h b/src/ui/a11y/lib/settings/tests/mocks/mock_settings_service.h
similarity index 89%
rename from src/ui/a11y/tests/mocks/mock_settings_service.h
rename to src/ui/a11y/lib/settings/tests/mocks/mock_settings_service.h
index 76e83e2..b538eae 100644
--- a/src/ui/a11y/tests/mocks/mock_settings_service.h
+++ b/src/ui/a11y/lib/settings/tests/mocks/mock_settings_service.h
@@ -2,14 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_SERVICE_H_
-#define SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_SERVICE_H_
+#ifndef SRC_UI_A11Y_LIB_SETTINGS_TESTS_MOCKS_MOCK_SETTINGS_SERVICE_H_
+#define SRC_UI_A11Y_LIB_SETTINGS_TESTS_MOCKS_MOCK_SETTINGS_SERVICE_H_
 
 #include <fuchsia/accessibility/cpp/fidl.h>
 #include <lib/async-loop/cpp/loop.h>
 #include <lib/fidl/cpp/binding_set.h>
 #include <lib/sys/cpp/testing/component_context_provider.h>
 #include <math.h>
+
 #include <src/lib/fxl/macros.h>
 
 namespace accessibility_test {
@@ -52,4 +53,4 @@
 
 }  // namespace accessibility_test
 
-#endif  // SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_SERVICE_H_
+#endif  // SRC_UI_A11Y_LIB_SETTINGS_TESTS_MOCKS_MOCK_SETTINGS_SERVICE_H_
diff --git a/src/ui/a11y/tests/mocks/mock_settings_watcher.cc b/src/ui/a11y/lib/settings/tests/mocks/mock_settings_watcher.cc
similarity index 97%
rename from src/ui/a11y/tests/mocks/mock_settings_watcher.cc
rename to src/ui/a11y/lib/settings/tests/mocks/mock_settings_watcher.cc
index 288c1f5..83b07ed 100644
--- a/src/ui/a11y/tests/mocks/mock_settings_watcher.cc
+++ b/src/ui/a11y/lib/settings/tests/mocks/mock_settings_watcher.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/tests/mocks/mock_settings_watcher.h"
+#include "src/ui/a11y/lib/settings/tests/mocks/mock_settings_watcher.h"
 
 #include <lib/sys/cpp/testing/component_context_provider.h>
 #include <lib/syslog/cpp/logger.h>
diff --git a/src/ui/a11y/tests/mocks/mock_settings_watcher.h b/src/ui/a11y/lib/settings/tests/mocks/mock_settings_watcher.h
similarity index 86%
rename from src/ui/a11y/tests/mocks/mock_settings_watcher.h
rename to src/ui/a11y/lib/settings/tests/mocks/mock_settings_watcher.h
index 92e3d8a..200555f 100644
--- a/src/ui/a11y/tests/mocks/mock_settings_watcher.h
+++ b/src/ui/a11y/lib/settings/tests/mocks/mock_settings_watcher.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_WATCHER_H_
-#define SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_WATCHER_H_
+#ifndef SRC_UI_A11Y_LIB_SETTINGS_TESTS_MOCKS_MOCK_SETTINGS_WATCHER_H_
+#define SRC_UI_A11Y_LIB_SETTINGS_TESTS_MOCKS_MOCK_SETTINGS_WATCHER_H_
 
 #include <fuchsia/accessibility/cpp/fidl.h>
 #include <lib/fidl/cpp/binding_set.h>
@@ -37,4 +37,4 @@
 
 }  // namespace accessibility_test
 
-#endif  // SRC_UI_A11Y_TESTS_MOCKS_MOCK_SETTINGS_WATCHER_H_
+#endif  // SRC_UI_A11Y_LIB_SETTINGS_TESTS_MOCKS_MOCK_SETTINGS_WATCHER_H_
diff --git a/src/ui/a11y/tests/integration/settings_manager_test.cc b/src/ui/a11y/lib/settings/tests/settings_manager_test.cc
similarity index 98%
rename from src/ui/a11y/tests/integration/settings_manager_test.cc
rename to src/ui/a11y/lib/settings/tests/settings_manager_test.cc
index 7a83d0b..c7af77b 100644
--- a/src/ui/a11y/tests/integration/settings_manager_test.cc
+++ b/src/ui/a11y/lib/settings/tests/settings_manager_test.cc
@@ -5,12 +5,13 @@
 #include <fuchsia/accessibility/cpp/fidl.h>
 #include <lib/gtest/test_loop_fixture.h>
 #include <lib/sys/cpp/testing/component_context_provider.h>
+
 #include <src/lib/fxl/logging.h>
 
 #include "gtest/gtest.h"
-#include "src/ui/a11y/bin/a11y_manager/settings/settings_manager_impl.h"
-#include "src/ui/a11y/tests/mocks/mock_settings_service.h"
-#include "src/ui/a11y/tests/mocks/mock_settings_watcher.h"
+#include "src/ui/a11y/lib/settings/settings_manager_impl.h"
+#include "src/ui/a11y/lib/settings/tests/mocks/mock_settings_service.h"
+#include "src/ui/a11y/lib/settings/tests/mocks/mock_settings_watcher.h"
 
 namespace accessibility_test {
 using fuchsia::accessibility::SettingsManagerStatus;
@@ -82,7 +83,7 @@
   }
 
   sys::testing::ComponentContextProvider context_provider_;
-  a11y_manager::SettingsManagerImpl settings_manager_impl_;
+  a11y::SettingsManagerImpl settings_manager_impl_;
 };
 
 const fuchsia::accessibility::Settings SettingsManagerTest::default_settings_ = InitSettings();
diff --git a/src/ui/a11y/lib/util/BUILD.gn b/src/ui/a11y/lib/util/BUILD.gn
new file mode 100644
index 0000000..64ca239
--- /dev/null
+++ b/src/ui/a11y/lib/util/BUILD.gn
@@ -0,0 +1,17 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+source_set("util") {
+  sources = [
+    "util.cc",
+    "util.h",
+  ]
+
+  public_deps = []
+
+  deps = [
+    "//garnet/public/lib/fsl",
+    "//sdk/fidl/fuchsia.ui.views",
+  ]
+}
diff --git a/src/ui/a11y/bin/a11y_manager/util.cc b/src/ui/a11y/lib/util/util.cc
similarity index 88%
rename from src/ui/a11y/bin/a11y_manager/util.cc
rename to src/ui/a11y/lib/util/util.cc
index 58ca0c1..f74f609 100644
--- a/src/ui/a11y/bin/a11y_manager/util.cc
+++ b/src/ui/a11y/lib/util/util.cc
@@ -2,9 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "src/ui/a11y/bin/a11y_manager/util.h"
+#include "src/ui/a11y/lib/util/util.h"
 
-namespace a11y_manager {
+namespace a11y {
 
 zx_koid_t GetKoid(const fuchsia::ui::views::ViewRef& view_ref) {
   return fsl::GetKoid(view_ref.reference.get());
@@ -23,4 +23,4 @@
   return result;
 }
 
-}  // namespace a11y_manager
+}  // namespace a11y
diff --git a/src/ui/a11y/bin/a11y_manager/util.h b/src/ui/a11y/lib/util/util.h
similarity index 75%
rename from src/ui/a11y/bin/a11y_manager/util.h
rename to src/ui/a11y/lib/util/util.h
index 7a34fc7..6540986 100644
--- a/src/ui/a11y/bin/a11y_manager/util.h
+++ b/src/ui/a11y/lib/util/util.h
@@ -2,14 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SRC_UI_A11Y_BIN_A11Y_MANAGER_UTIL_H_
-#define SRC_UI_A11Y_BIN_A11Y_MANAGER_UTIL_H_
+#ifndef SRC_UI_A11Y_LIB_UTIL_UTIL_H_
+#define SRC_UI_A11Y_LIB_UTIL_UTIL_H_
 
 #include <fuchsia/ui/views/cpp/fidl.h>
 #include <lib/fsl/handles/object_info.h>
 #include <lib/zx/event.h>
 
-namespace a11y_manager {
+namespace a11y {
 
 // Utility function to extract Koid from an event.
 zx_koid_t GetKoid(const fuchsia::ui::views::ViewRef& view_ref);
@@ -18,6 +18,6 @@
 std::array<float, 9> Multiply3x3MatrixRowMajor(std::array<float, 9> left,
                                                std::array<float, 9> right);
 
-}  // namespace a11y_manager
+}  // namespace a11y
 
-#endif  // SRC_UI_A11Y_BIN_A11Y_MANAGER_UTIL_H_
+#endif  // SRC_UI_A11Y_LIB_UTIL_UTIL_H_
diff --git a/src/ui/a11y/tests/BUILD.gn b/src/ui/a11y/tests/BUILD.gn
deleted file mode 100644
index e1d74e9..0000000
--- a/src/ui/a11y/tests/BUILD.gn
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 2018 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//build/test/test_package.gni")
-
-group("tests") {
-  testonly = true
-  public_deps = [
-    ":a11y_tests",
-  ]
-}
-
-test_package("a11y_tests") {
-  deps = [
-    "integration:tests",
-  ]
-  resources = [
-    # needed for semantics_manager_test
-    {
-      path = "integration/testdata/semantic_tree_single_node.json"
-      dest = "semantic_tree_single_node.json"
-    },
-    {
-      path = "integration/testdata/semantic_tree_even_nodes.json"
-      dest = "semantic_tree_even_nodes.json"
-    },
-    {
-      path = "integration/testdata/semantic_tree_odd_nodes.json"
-      dest = "semantic_tree_odd_nodes.json"
-    },
-    {
-      path = "integration/testdata/deleted_subtree_even_nodes.json"
-      dest = "deleted_subtree_even_nodes.json"
-    },
-    {
-      path = "integration/testdata/cyclic_semantic_tree.json"
-      dest = "cyclic_semantic_tree.json"
-    },
-    {
-      path = "integration/testdata/semantic_tree_not_parseable.json"
-      dest = "semantic_tree_not_parseable.json"
-    },
-  ]
-
-  tests = [
-    {
-      name = "a11y_manager_apptests"
-      environments = basic_envs
-    },
-  ]
-}