diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py
index de631b62..0b4dd372 100644
--- a/altair/utils/schemapi.py
+++ b/altair/utils/schemapi.py
@@ -404,10 +404,10 @@ class SchemaBase(object):
             parsed_shorthand = context.pop("parsed_shorthand", {})
             # Prevent that pandas categorical data is automatically sorted
             # when a non-ordinal data type is specifed manually
-            if "sort" in parsed_shorthand and kwds["type"] not in [
-                "ordinal",
-                Undefined,
-            ]:
+            # or if the encoding channel does not support sorting
+            if "sort" in parsed_shorthand and (
+                "sort" not in kwds or kwds["type"] not in ["ordinal", Undefined]
+            ):
                 parsed_shorthand.pop("sort")
 
             kwds.update(
diff --git a/tools/schemapi/schemapi.py b/tools/schemapi/schemapi.py
index 9fa2dccb..7f14f7bb 100644
--- a/tools/schemapi/schemapi.py
+++ b/tools/schemapi/schemapi.py
@@ -402,10 +402,10 @@ class SchemaBase(object):
             parsed_shorthand = context.pop("parsed_shorthand", {})
             # Prevent that pandas categorical data is automatically sorted
             # when a non-ordinal data type is specifed manually
-            if "sort" in parsed_shorthand and kwds["type"] not in [
-                "ordinal",
-                Undefined,
-            ]:
+            # or if the encoding channel does not support sorting
+            if "sort" in parsed_shorthand and (
+                "sort" not in kwds or kwds["type"] not in ["ordinal", Undefined]
+            ):
                 parsed_shorthand.pop("sort")
 
             kwds.update(

diff --git a/tests/vegalite/v5/tests/test_api.py b/tests/vegalite/v5/tests/test_api.py
index b4b82a17..404f0a45 100644
--- a/tests/vegalite/v5/tests/test_api.py
+++ b/tests/vegalite/v5/tests/test_api.py
@@ -138,16 +138,30 @@ def test_chart_infer_types():
         assert dct["encoding"]["size"]["type"] == "ordinal"
         assert dct["encoding"]["size"]["field"] == "s"
         assert dct["encoding"]["size"]["sort"] == [2, 1]
+        assert dct["encoding"]["tooltip"]["type"] == "ordinal"
+        assert dct["encoding"]["tooltip"]["field"] == "s"
+        # "sort" should be removed for channels that don't support it
+        assert "sort" not in dct["encoding"]["tooltip"]
 
     # Pass field names by keyword
-    chart = alt.Chart(data).mark_point().encode(x="x", y="y", color="c", size="s")
+    chart = (
+        alt.Chart(data)
+        .mark_point()
+        .encode(x="x", y="y", color="c", size="s", tooltip="s")
+    )
     _check_encodings(chart)
 
     # pass Channel objects by keyword
     chart = (
         alt.Chart(data)
         .mark_point()
-        .encode(x=alt.X("x"), y=alt.Y("y"), color=alt.Color("c"), size=alt.Size("s"))
+        .encode(
+            x=alt.X("x"),
+            y=alt.Y("y"),
+            color=alt.Color("c"),
+            size=alt.Size("s"),
+            tooltip=alt.Tooltip("s"),
+        )
     )
     _check_encodings(chart)
 
@@ -155,7 +169,7 @@ def test_chart_infer_types():
     chart = (
         alt.Chart(data)
         .mark_point()
-        .encode(alt.X("x"), alt.Y("y"), alt.Color("c"), alt.Size("s"))
+        .encode(alt.X("x"), alt.Y("y"), alt.Color("c"), alt.Size("s"), alt.Tooltip("s"))
     )
     _check_encodings(chart)
 
@@ -167,6 +181,7 @@ def test_chart_infer_types():
             alt.X("x", type="nominal"),
             alt.Y("y", type="ordinal"),
             alt.Size("s", type="nominal"),
+            alt.Tooltip("s", type="nominal"),
         )
     )
     dct = chart.to_dict()
@@ -174,6 +189,8 @@ def test_chart_infer_types():
     assert dct["encoding"]["y"]["type"] == "ordinal"
     assert dct["encoding"]["size"]["type"] == "nominal"
     assert "sort" not in dct["encoding"]["size"]
+    assert dct["encoding"]["tooltip"]["type"] == "nominal"
+    assert "sort" not in dct["encoding"]["tooltip"]
 
 
 @pytest.mark.parametrize(

tooltip throws error for Categorical variable
The following code used to work in recent versions of `altair` including the current in-development branch

But by commit f8912bad75d4247ab7 this code throws an error.

The problem appears to be that specifying a variable for a tooltip without a type throws an error if the variable in a `pandas.Categorical`.

Specifically, this code:

````
import altair as alt
import pandas as pd

df = (
    pd.DataFrame({"x": [1, 2], "y": [1, 2], "note": ["a", "b"]})
    .assign(note=lambda x: pd.Categorical(x["note"], ordered=True))
)

alt.Chart(df).encode(x="x", y="y", tooltip=["x", "y", "note"]).mark_point()
```

Now throws an error.

The error is:

```
---------------------------------------------------------------------------
SchemaValidationError                     Traceback (most recent call last)
File /fh/fast/bloom_j/software/miniconda3/envs/dms-vep-pipeline/lib/python3.11/site-packages/altair/vegalite/v5/api.py:2194, in Chart.to_dict(self, *args, **kwargs)
   2192     copy.data = core.InlineData(values=[{}])
   2193     return super(Chart, copy).to_dict(*args, **kwargs)
-> 2194 return super().to_dict(*args, **kwargs)

File /fh/fast/bloom_j/software/miniconda3/envs/dms-vep-pipeline/lib/python3.11/site-packages/altair/vegalite/v5/api.py:559, in TopLevelMixin.to_dict(self, *args, **kwargs)
    556 context["top_level"] = False
    557 kwargs["context"] = context
--> 559 dct = super(TopLevelMixin, copy).to_dict(*args, **kwargs)
    561 # TODO: following entries are added after validation. Should they be validated?
    562 if is_top_level:
    563     # since this is top-level we add $schema if it's missing

File /fh/fast/bloom_j/software/miniconda3/envs/dms-vep-pipeline/lib/python3.11/site-packages/altair/utils/schemapi.py:422, in SchemaBase.to_dict(self, validate, ignore, context)
    420         self.validate(result)
    421     except jsonschema.ValidationError as err:
--> 422         raise SchemaValidationError(self, err)
    423 return result

SchemaValidationError: Invalid specification

        altair.vegalite.v5.api.Chart->0, validating 'type'

        [{'field': 'x', 'type': 'quantitative'}, {'field': 'y', 'type': 'quantitative'}, {'field': 'note', 'type': 'ordinal', 'sort': ['a', 'b']}] is not of type 'object'
        [{'field': 'x', 'type': 'quantitative'}, {'field': 'y', 'type': 'quantitative'}, {'field': 'note', 'type': 'ordinal', 'sort': ['a', 'b']}] is not of type 'object'
        Additional properties are not allowed ('sort' was unexpected)
        [{'field': 'x', 'type': 'quantitative'}, {'field': 'y', 'type': 'quantitative'}, {'field': 'note', 'type': 'ordinal', 'sort': ['a', 'b']}] is not of type 'null'
```

tests/vegalite/v5/tests/test_api.py::test_chart_infer_types
tests/vegalite/v5/tests/test_api.py::test_chart_data_types tests/vegalite/v5/tests/test_api.py::test_multiple_encodings[args0-kwargs0] tests/vegalite/v5/tests/test_api.py::test_multiple_encodings[args1-kwargs1] tests/vegalite/v5/tests/test_api.py::test_multiple_encodings[args2-kwargs2] tests/vegalite/v5/tests/test_api.py::test_multiple_encodings[args3-kwargs3] tests/vegalite/v5/tests/test_api.py::test_multiple_encodings[args4-kwargs4] tests/vegalite/v5/tests/test_api.py::test_multiple_encodings[args5-kwargs5] tests/vegalite/v5/tests/test_api.py::test_chart_operations tests/vegalite/v5/tests/test_api.py::test_selection_to_dict tests/vegalite/v5/tests/test_api.py::test_selection_expression tests/vegalite/v5/tests/test_api.py::test_save[altair_saver-html] tests/vegalite/v5/tests/test_api.py::test_save[altair_saver-json] tests/vegalite/v5/tests/test_api.py::test_save[altair_saver-png] tests/vegalite/v5/tests/test_api.py::test_save[altair_saver-svg] tests/vegalite/v5/tests/test_api.py::test_save[altair_saver-pdf] tests/vegalite/v5/tests/test_api.py::test_save[altair_saver-bogus] tests/vegalite/v5/tests/test_api.py::test_save[vl-convert-html] tests/vegalite/v5/tests/test_api.py::test_save[vl-convert-json] tests/vegalite/v5/tests/test_api.py::test_save[vl-convert-pdf] tests/vegalite/v5/tests/test_api.py::test_save[vl-convert-bogus] tests/vegalite/v5/tests/test_api.py::test_save_html[False] tests/vegalite/v5/tests/test_api.py::test_facet_basic tests/vegalite/v5/tests/test_api.py::test_facet_parse tests/vegalite/v5/tests/test_api.py::test_facet_parse_data tests/vegalite/v5/tests/test_api.py::test_selection tests/vegalite/v5/tests/test_api.py::test_transforms tests/vegalite/v5/tests/test_api.py::test_filter_transform_selection_predicates tests/vegalite/v5/tests/test_api.py::test_resolve_methods tests/vegalite/v5/tests/test_api.py::test_layer_encodings tests/vegalite/v5/tests/test_api.py::test_add_selection tests/vegalite/v5/tests/test_api.py::test_repeat_add_selections tests/vegalite/v5/tests/test_api.py::test_facet_add_selections tests/vegalite/v5/tests/test_api.py::test_layer_add_selection tests/vegalite/v5/tests/test_api.py::test_compound_add_selections[concat] tests/vegalite/v5/tests/test_api.py::test_compound_add_selections[hconcat] tests/vegalite/v5/tests/test_api.py::test_compound_add_selections[vconcat] tests/vegalite/v5/tests/test_api.py::test_selection_property tests/vegalite/v5/tests/test_api.py::test_LookupData tests/vegalite/v5/tests/test_api.py::test_themes tests/vegalite/v5/tests/test_api.py::test_chart_from_dict tests/vegalite/v5/tests/test_api.py::test_consolidate_datasets tests/vegalite/v5/tests/test_api.py::test_consolidate_InlineData tests/vegalite/v5/tests/test_api.py::test_repeat tests/vegalite/v5/tests/test_api.py::test_data_property tests/vegalite/v5/tests/test_api.py::test_subcharts_with_same_data[data.json-layer] tests/vegalite/v5/tests/test_api.py::test_subcharts_with_same_data[data.json-hconcat] tests/vegalite/v5/tests/test_api.py::test_subcharts_with_same_data[data.json-vconcat] tests/vegalite/v5/tests/test_api.py::test_subcharts_with_same_data[data.json-concat] tests/vegalite/v5/tests/test_api.py::test_subcharts_with_same_data[data1-layer] tests/vegalite/v5/tests/test_api.py::test_subcharts_with_same_data[data1-hconcat] tests/vegalite/v5/tests/test_api.py::test_subcharts_with_same_data[data1-vconcat] tests/vegalite/v5/tests/test_api.py::test_subcharts_with_same_data[data1-concat] tests/vegalite/v5/tests/test_api.py::test_subcharts_different_data[data.json-layer] tests/vegalite/v5/tests/test_api.py::test_subcharts_different_data[data.json-hconcat] tests/vegalite/v5/tests/test_api.py::test_subcharts_different_data[data.json-vconcat] tests/vegalite/v5/tests/test_api.py::test_subcharts_different_data[data.json-concat] tests/vegalite/v5/tests/test_api.py::test_subcharts_different_data[data1-layer] tests/vegalite/v5/tests/test_api.py::test_subcharts_different_data[data1-hconcat] tests/vegalite/v5/tests/test_api.py::test_subcharts_different_data[data1-vconcat] tests/vegalite/v5/tests/test_api.py::test_subcharts_different_data[data1-concat] tests/vegalite/v5/tests/test_api.py::test_layer_facet tests/vegalite/v5/tests/test_api.py::test_layer_errors tests/vegalite/v5/tests/test_api.py::test_resolve[layer] tests/vegalite/v5/tests/test_api.py::test_resolve[hconcat] tests/vegalite/v5/tests/test_api.py::test_resolve[vconcat] tests/vegalite/v5/tests/test_api.py::test_resolve[concat] tests/vegalite/v5/tests/test_api.py::test_resolve[facet] tests/vegalite/v5/tests/test_api.py::test_resolve[facet_encoding] tests/vegalite/v5/tests/test_api.py::test_resolve[repeat] tests/vegalite/v5/tests/test_api.py::test_facet[None-chart] tests/vegalite/v5/tests/test_api.py::test_facet[None-layer] tests/vegalite/v5/tests/test_api.py::test_facet[facet-chart] tests/vegalite/v5/tests/test_api.py::test_facet[facet-layer] tests/vegalite/v5/tests/test_api.py::test_facet[row-chart] tests/vegalite/v5/tests/test_api.py::test_facet[row-layer] tests/vegalite/v5/tests/test_api.py::test_facet[column-chart] tests/vegalite/v5/tests/test_api.py::test_facet[column-layer] tests/vegalite/v5/tests/test_api.py::test_sequence tests/vegalite/v5/tests/test_api.py::test_graticule tests/vegalite/v5/tests/test_api.py::test_sphere tests/vegalite/v5/tests/test_api.py::test_validate_dataset